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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to run a build table query from a batch file 1

Status
Not open for further replies.

evr72

MIS
Dec 8, 2009
265
US
Hello,

I am not sure if this is the correct place to post this, if it is not I apologize, please let me know and I will repost.

I am trying to run a build table query from a batch file, so far I have not been able to do it. I found that I can build a vbscript and that is what I have done, but my script is not working.
here is what I have so far
Code:
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "C:\OpenOrdersSTDHours\OPENORD.ACCDB"
appAccess.Run "ROUTSTDHRS"
Set appAccess = Nothing
 
So, ROUTSTDHRS is the name of a procedure ?

For running a query, I'd use appAccess.DoCmd method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
ROUTSTDHRS is the name of my "make table query" thank you PHV, I tried the appAccess.DoCmd instead of the appAccess.Run but got an error "Object does not support this property or method: appAccess.DoCmd"
 
I miant you'll try this:
appAccess.DoCmd.OpenQuery "ROUTSTDHRS"


Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV YOU ROCK!!!!!!!!!!!!!

That workded like a charm!!!

thank you!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top