First time post here ... I have been researching and not found info on
this.
One user here described the succinct way to call MS-Access and kick
off a command:
=====
Dim app As Access.Application
Set app = GetObject(, "Access.Application.8")
If Err.Number = 429 Then
Set app = CreateObject("Access.Application.8")
End If
app.docmd.beep
Set app = Nothing
=====
This works fine and I will substitute the main command with:
app.docmd.runmacro("myMacro")
The macro calls a function in a module and then quits the app.
The question here is:
How can a numeric value be returned to the calling vb program?
Does the VB code wait for a return value at all or do we need to
perhaps write a TXT file to pass this to the calling program?
I guess we will see, but does the VB program still run while the
Access object is doing it's data processing? or does the VB need to
run in a loop, continuously checking for the result file?
Thanks in advance for any help.
- Paul