shell to run another mdb

  • Thread starter Thread starter iccsi
  • Start date Start date
I

iccsi

I tried to use Shell to run another mdb file.
I can run MS Access.EXE, but it seems it does not accept .mdb as
paramater as following code

RetVal = Shell("C:\Program Files\Microsoft Office
\OFFICE11\MSACCESS.EXE D:\Documents and Settings\myuser\Desktop\My App
\MyMDB.mdb", 1)

Are there any way to open .mdb file using Shell command?

Your information is great appreciated,
 
Your quotes are wrong

RetVal = Shell("""C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""
""D:\Documents and Settings\myuser\Desktop\My App\MyMDB.mdb""", 1)

That's three double quotes at the beginning and end, and two double quotes,
space, two more double quotes in the middle.
 
Your quotes are wrong

RetVal = Shell("""C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""
""D:\Documents and Settings\myuser\Desktop\My App\MyMDB.mdb""", 1)

That's three double quotes at the beginning and end, and two double quotes,
space, two more double quotes in the middle.

--
Doug Steele, Microsoft Access MVPhttp://www.AccessMVP.com/DJSteele
(no e-mails, please!)









- Show quoted text -

Thanks millions,
 
Your quotes are wrong

RetVal =Shell("""C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""
""D:\Documents and Settings\myuser\Desktop\My App\MyMDB.mdb""", 1)

That's three double quotes at the beginning and end, and two double quotes,
space, two more double quotes in the middle.

--
Doug Steele, Microsoft Access MVPhttp://www.AccessMVP.com/DJSteele
(no e-mails, please!)









- Show quoted text -

Thnaks millions,
Can Shell statement to kill or close the mdb opened by Shell?

Thanks again for helping,
 
Assuming I understand your question correctly, no, you cannot use the Shell
statement to close an instance that's been opened.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Your quotes are wrong

RetVal =Shell("""C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""
""D:\Documents and Settings\myuser\Desktop\My App\MyMDB.mdb""", 1)

That's three double quotes at the beginning and end, and two double
quotes,
space, two more double quotes in the middle.

--
Doug Steele, Microsoft Access MVPhttp://www.AccessMVP.com/DJSteele
(no e-mails, please!)









- Show quoted text -

Thnaks millions,
Can Shell statement to kill or close the mdb opened by Shell?

Thanks again for helping,
 
Back
Top