I'm trying to automate an Access app from Excel. The app writes out orders
for various products, and the Excel sheet has an inventory. That way the user
can select an item in Excel, click the "Order" button, and presto, Access
pops-up with a filled out order they can Save.
Only one problem: after the item is selected, there's a function that has to
fire on the form to fill in various info fields based on the selected item. I
can't figure out the syntax.
Here's the line that sets up the order and fills in all the defaults...
oAccessApp.Run "SetupOrderEditor", 0
I then look up the line in the temp table and poke in the proper ID. After
that I open the form with...
oAccessApp.Visible = True
oAccessApp.DoCmd.OpenForm "Order Editor", acNormal, , , , acDialog
So far, so good, but now I have to call that function...
oAccessApp.Forms("Order Editor").Run "UpdateSecurityInfo"
And that gets me a "form not found". Now I know it is found, because it's
open and looks great.
Any ideas? I seem to remember there's some simple but non-obvious syntax for
this.
Maury
|