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

Running Access from Access code problems

Status
Not open for further replies.

newcoder54

Technical User
Jul 2, 2002
46
US
I am trying to run another Access 97 database from within my currently open database. The goal is to use some buttons on my main database to run others that move data around.

This code kind of works but never finishes and something sure is not right. Comments please - Larry

Function RunDownloader()

'Need to run one Access 97 from another Access 97

Dim AccessApp As Object
Set AccessApp = CreateObject("Access.Application")
AccessApp.Visible = False
AccessApp.OpenCurrentDatabase ("C:\Download\downloader.mdb")
AccessApp.Run "RemoteRun"
AccessApp.Quit ' Quit "downloader.mdb" 'this seems to be the error, the application does seem to do its job but never quite quits.
Set AccessApp = Nothing ' releases the reference.


End Function
 
At the end of your "RemoteRun" have you tired to "quit" from their?
 
You can try this, as the AccessApp is not visible:
AccessApp.DoCmd.SetWarnings False


Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Do they both point to the same back end? If so, just set a reference to the second front end and you can run all the code directly.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top