Programmatically set the default database folder in MS Access

D

Dominique

Does anyone know how to programmatically set the default
database folder in MS Access? Your reply will be greatly
appreciated.

Dom
 
D

Dirk Goldgar

Dominique said:
Does anyone know how to programmatically set the default
database folder in MS Access? Your reply will be greatly
appreciated.

Dom

I think this should do it:

Application.SetOption "Default Database Directory", "C:\Some
Folder\"

See the help-file topic "Set Options from Visual Basic" -- if you can
find it.
 
D

david epsom dot com dot au

I'm not sure this is a good idea: what are you trying to
achieve?

If you are having reference problems, you should include
the full path to the referenced file.

There are very few other reasons why the default database
folder is relevant to anything at run time.

(david)
 
Joined
May 9, 2013
Messages
1
Reaction score
0
I'm not sure this is a good idea: what are you trying to
achieve?

If you are having reference problems, you should include
the full path to the referenced file.

There are very few other reasons why the default database
folder is relevant to anything at run time.

(david)

I know a good reason - the Default Database Folder is set to normal default user in an MDE file in multi user environment despite what you have filled in in the MDB file. If you start another application from MSA and it expects another start directory then the default - you want to set this programmatically ---
 

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

Top