Hi guys,
So glad I came across this forum, hoping someone can help this newbie out!!
I am trying to populate fields on an InfoPath form that someone else developed. I am using data from an Access database to populate the fields. I have never worked with InfoPath before.
So far all I'm able to do is open the InfoPath template (.xsn) file, but I'm not exactly sure how I start populating data in the fields. This is the code I have so far:
Dim appInfoPath As InfoPath.Application
Dim docInfoPath As InfoPath.XDocument
Set appInfoPath = CreateObject("infopath.Application") 'Create an instance of InfoPath
Set docInfoPath = appInfoPath.XDocuments.NewFromSolution("N:\Database\Compensation\Working copy\Payment_Request.xsn")
After looking at the 'Watch' window in Access, I can see the fields (eg, "SAPDocNumber") I want to populate but as I said, not sure what code I need to use to actually do that (see image).
http://imageshack.us/photo/my-images/834/watchwindow.jpg
Any help you can give would be really appreciated.
Cheers