Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use vbScript to run a Sub in MS Access 1

Status
Not open for further replies.

teach314

Technical User
Jul 29, 2011
183
CA
hi - I'm sure this is really straightforward, but I'm missing something.

I need to run a sub in my mdb file using vbScript. The following works perfectly:

dim objAccess
objAccess.OpenCurrentDataBase("C:\Temp\TEST_db.mdb")
objAccess.Run "ProcessData"
objAccess.Quit
set objAccess = nothing

But, I'm having trouble running a Sub that takes an argument. How would I run the Sub ProcessData(25) ? I keep getting the error message "Microsoft Access can't find the procedure 'ProcessData(25)' "

thanks in advance for help.
 
I'd try this:
objAccess.Run "ProcessData", 25

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top