Calling Databases, and paths

simon mills

Registered User.
Local time
Today, 13:03
Joined
Sep 20, 2005
Messages
14
Hello.

I have a database that runs a fews tasks for me me when no one is in the office as the systems are quicker and the admin work tedeous and boring, yet necessay. The problem Im having is in calling a database. The problem stems, i think, from the names on the folder. Unfortunately renaming isnt an option because its got many hundreds of users on the server and I dont have the admin rights besides.

The error is coming on .......

Call Shell("msaccess u:\team-shared-data\Res. Sales\Outsource\Outsource_Dbs\Database_Store\Outsource.mdb").

The error message I get says that u:\team.mdb isnt valid .... when its not. The error is caused presumably by the " - 's " and probable after it passes this the " Res. Sales" will cause an error too. So my question Im asking is, is there anyway to make the path read in full, I've tried preceeding with < and ending with > and "" or even ' but still no joy. Can anyone please help, its getting annoying now. :o :confused:
 
Hi,

I'm not 100% sure what could be causing the problem but setting long strings as strings does often get rid of some of the glitches have u tried...

Dim stDBLocation As String

stDBLocation = "msaccess u:\team-shared-data\Res. Sales\Outsource\Outsource_Dbs\Database_Store\Outsource.mdb"

Call Shell(stDBLocation)


Let me know if it works...
 
Hi thanx for looking. Im still getting the same error ...

"The command line you used to start microsoft Access contains an option that Microsoft access doesnt recognise. Exit and restart Microsoft access using valid command line options" When you click ok it pops up 3 more times, it the follows that error message with .....

" Microsoft access cant find the database file u:\team.mdb "

:confused:
 
You have to enclose the full path and database name by quotes (")

Access doesnt like working with spaces in filenames or paths....

Call Shell("""msaccess u:\team-shared-data\Res. Sales\Outsource\Outsource_Dbs\Database_Store\Outso urce.mdb""").
 
Thank you so much.
I had to change the quotation marks slightly but it now opens it on call.
Call Shell("msaccess ""u:\team-shared-data\Res. Sales\Outsource\Outsource_Dbs\Database_Store\Outso urce.mdb""").

Thanx again, you have just solved something in the blink of an eye that has been puzzling me and my colleges for a week. Cheers
 
Ack :eek: Yes offcourse that is the way its suposed to be....

Sorry for the typo...
 

Users who are viewing this thread

Back
Top Bottom