Open Application

AndyShuter

Registered User.
Local time
Today, 01:53
Joined
Mar 3, 2003
Messages
151
This seems like a very silly question but I wondered if someone could tell me how I open up another mdb file from a form?

I've tried the following

On Error GoTo Err_Command976_Click
DoCmd.Quit

Dim stAppName As String

stAppName = "S:\update\UpdateMDEUtility.mdb"
Call Shell(stAppName, 1)

Exit_Command976_Click:
Exit Sub

Err_Command976_Click:
MsgBox Err.Description
Resume Exit_Command976_Click

End Sub

But I just keep getting "Invalid Call Procedure or Argument"

Many Thanks

Andy
 
Searching this forum is such a novel idea. :p

You have to define the executable that opens the file...
Code:
stAppName = "C:\Program Files\Microsoft Office\OFFICE11\msaccess.exe S:\update\UpdateMDEUtility.mdb"
I prefer the ShellExecute method I am using to open a file in my
Browse [Find a directory or file] sample. It does not have the problems the Shell() function has if the file name or file path contains a space.
 

Users who are viewing this thread

Back
Top Bottom