Program Posted July 23, 2004 Posted July 23, 2004 This is what i got in 1 command to open a database using the workgroup file. However i cant open it using COMSPEC. If i type the following command into the cmd line, the database will run fine. "c:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /wrkgrp "q:\access workgroup file\system.mdw" "\\rome\Division\Database\pipeline.mdb" But if i try to type the following command, it does not work: Run(@COMSPEC & " /c ""c:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"" /wrkgrp ""q:\access workgroup file\system.mdw"" ""\\rome\Division\Database\pipeline.mdb"" ") Can somebody please show me the light.
ezzetabi Posted July 23, 2004 Posted July 23, 2004 (edited) When you have " in your lines use ' so you have to avoid doubles that are very confusing... "c:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /wrkgrp "q:\access workgroup file\system.mdw" "\\rome\Division\Database\pipeline.mdb" Try: Run(@Comspec & ' /c "c:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /wrkgrp "q:\access workgroup file\system.mdw" "\\rome\Division\Database\pipeline.mdb"') Sometime (it is unclear why to me) even .exe need START to be started: So you may also try: Remove the first two "" near the start if you are using Win9x Run(@Comspec & ' /c start "" "c:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /wrkgrp "q:\access workgroup file\system.mdw" "\\rome\Division\Database\pipeline.mdb"') Edited July 23, 2004 by ezzetabi
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now