I need to start an Access app from an Access app.
Is the shell command the way to go? or is there another preferred method?
Starting an Access app from another Access app.
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
-
- Administrator
- Posts: 78792
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Starting an Access app from another Access app.
If you only need to open a database in another instance of Access, you can use Shell.
If you want to manipulate the database in code, you can use Automation:
Dim app As Access.Application
Set app = CreateObject("Access.Application")
app.OpenCurrentDatabase "C:\Databases\MyDatabase.mdb"
...
app.DoCmd.OpenQuery "MyQuery"
...
app.Quit
Set app = Nothing
If you want to manipulate the database in code, you can use Automation:
Dim app As Access.Application
Set app = CreateObject("Access.Application")
app.OpenCurrentDatabase "C:\Databases\MyDatabase.mdb"
...
app.DoCmd.OpenQuery "MyQuery"
...
app.Quit
Set app = Nothing
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: Starting an Access app from another Access app.
No i just have to start the access app.
Good to know the other approach though.
Thank you
Good to know the other approach though.
Thank you