shell to run another mdb


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,
 
Ad

Advertisements

D

Douglas J. Steele

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.
 
I

iccsi

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,
 
I

iccsi

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,
 
Ad

Advertisements

D

Douglas J. Steele

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top