Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Open Access ADP File Without a Mapped Drive 1

Status
Not open for further replies.

TTops

MIS
Sep 13, 2004
70
US
Hello,

I have the following code in place in a VBA application that works just fine:

Shell("c:\program files\microsoft office\office11\msaccess.exe Z:\DrawingMgrPROG.adp", vbMaximizedFocus)

However, this code requires that the machine using my application have a mapped drive (Z) to the correct location. When I have replaced the "Z" with the full network path, the code generates the following error - "The command line you used to start Microsoft Office Access contains an option that Microsoft Office Access doesn't recognize. Exit and restart Microsoft Office Access using valid command-line options." How do I use this code without using a mapped drive.

Thanks in advance for any help,
T-Tops

 
You probably have embedded space(s) in the pathname:
Shell """c:\program files\microsoft office\office11\msaccess.exe"" ""\\server\shared dir\DrawingMgrPROG.adp""", vbMaximizedFocus

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You know, I tried putting extra parenthesis around the whole thing and it didn't work. The extra double quotes did the trick.

PHV....you the man!

Thanks alot.



Thanks,
T-Tops
 
I'm trying to use the double quotes trick to take care of this same problem but I get a compile error whe I add them "Expected end statement" or something like that. What am I doing wrong?

KTB916
 
KTB916, please start a new thread with YOUR code.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top