Query InfoPath from Access

C

Chris Mahoney

Hello everyone

Hopefully this is my last problem :)

I have a button in Access which opens InfoPath and updates a field. I
then wish to requery so that the updated field is used. I have the
following code in Access:

Dim objInfoPath As New InfoPath.Application
objInfoPath.XDocuments.NewFromSolution "D:\Path\To\manifest.xsf"
objInfoPath.XDocuments(0).DOM.SelectSingleNode("//my:AppNumber").Text =
123
objInfoPath.XDocuments(0).DataAdapters("Main connection").Query

Unfortunately, that fails at .DataAdapters with "Method or data member
not found."

I'm sure I'm missing something simple, so any advice would be
appreciated.

Thanks
Chris
 
C

Chris Mahoney

Got it :)

I added an OnAfterChange event to the AppNumber textbox, then did the
query in there.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top