Launch Program from Access

D

David M C

Below is the shortcut I would use to launch the app from the Windows Desktop:

Target: "K:\Texlink GPRS\Gpstrack.exe"
Start in: "K:\Texlink GPRS"

How would I launch the same program from Access? I can get the program to
launch, but I can't specify the starting folder, resulting in the GPstrack
throwing an error.

Thanks,

Dave
 
B

bob

here's a simple option:

Private Sub Command29_Click()
Call Shell("K:\Texlink GPRS\Gpstrack.exe", 1)
End Sub

add error handling for safety

Bob
 
S

Stefan Hoffmann

hi Bob,
here's a simple option:
Call Shell("K:\Texlink GPRS\Gpstrack.exe", 1)
Using the ShellExcute method gives you the ability to choose any
starting folder, when using the parameter lpDirectory.

mfG
--> stefan <--
 
D

David M C

Thanks, I'll give it a go.

Dave

Stefan Hoffmann said:
hi Bob,

Using the ShellExcute method gives you the ability to choose any
starting folder, when using the parameter lpDirectory.

mfG
--> stefan <--
 
Top