Jump to content

Cant run a database in a workgroup


Recommended Posts

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.

Link to comment
Share on other sites

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 by ezzetabi
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...