Donna Tunstall
Registered User.
- Local time
- Today, 09:30
- Joined
- Aug 16, 2001
- Messages
- 17
Hello there!
I've searched the forum for help on this but can't seem to find what I need. I know I can run batch files from Access but I seem to be hitting a brick wall. Maybe it's because I a bit fick or maybe because it's Friday but I'm just completely stuck.
I have the basic syntax down OK and can get the calculator to execute using this example.
Sub Test()
Dim RetVal
RetVal = Shell("C:\WINNT\SYSTEM32\calc.exe", 1)
End Sub
Moving ahead from there I can get X:\DIRECTORY\SUBDIRECTORY\PKZIP.EXE to run also. But when I try to run a batch file with the command PKZIP -A OTTAWA Ot*.snp inside it bums out, or even if I just call a batch file with PKZIP.EXE as it's only command (just as a test) it changes the format of the sub-directory and I end up with this in the DOS window:
X:\DIRECTORY\SUBDIRECTORY> (note the addition of the greater than sign) and "PKZIP.EXE is not recognised as an internal or external command, operable program or batch file".
I am obviously screwing up on syntax somewhere but the Access "help" file isn't really helping at all and I don't know where else to turn. Can someone help me figure out what it is that I am missing - or am I just totally off base on what I can do with this Shell command thingie.
Comments appreciated. Thanks in advance and apologies if I am covering old ground.
I've searched the forum for help on this but can't seem to find what I need. I know I can run batch files from Access but I seem to be hitting a brick wall. Maybe it's because I a bit fick or maybe because it's Friday but I'm just completely stuck.
I have the basic syntax down OK and can get the calculator to execute using this example.
Sub Test()
Dim RetVal
RetVal = Shell("C:\WINNT\SYSTEM32\calc.exe", 1)
End Sub
Moving ahead from there I can get X:\DIRECTORY\SUBDIRECTORY\PKZIP.EXE to run also. But when I try to run a batch file with the command PKZIP -A OTTAWA Ot*.snp inside it bums out, or even if I just call a batch file with PKZIP.EXE as it's only command (just as a test) it changes the format of the sub-directory and I end up with this in the DOS window:
X:\DIRECTORY\SUBDIRECTORY> (note the addition of the greater than sign) and "PKZIP.EXE is not recognised as an internal or external command, operable program or batch file".
I am obviously screwing up on syntax somewhere but the Access "help" file isn't really helping at all and I don't know where else to turn. Can someone help me figure out what it is that I am missing - or am I just totally off base on what I can do with this Shell command thingie.
Comments appreciated. Thanks in advance and apologies if I am covering old ground.