Programmatically set the default database folder in MS Access

  • Thread starter Thread starter Dominique
  • Start date Start date
D

Dominique

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

Dom
 
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.
 
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'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 ---
 
Back
Top