default database folder property

G

Gary Roach

i need to find the default database folder value in VBA for some Access
code. i can't find any references to it in the object browser. thanks for
the help

gary
 
D

Douglas J. Steele

Assuming you're talking about the folder that Access searches for MDB files
when you first open it, I think your only option is to read it from the
registry.

It's the Default Database Directory key in
HKEY_CURRENT_USER\Software\Microsoft\Office\x.0\Access\Settings, where x is
8 for Access 97, 9 for Access 2000, 10 for Access 2002 and 11 for Access
2003.

There's code to read the registry at
http://www.mvps.org/access/api/api0015.htm at "The Access Web"
 
G

Gary Roach

okay, thanks. i thought this setting was database specific so i could use it
specify where pictures are to be located so that i could specify relative
paths for pictures. i wanted to do this so my databases could be relocatable
when i send them to customers. there must be a way to find out where the
database is located and use that as a basis for relative paths.
 
D

david epsom dot com dot au

database is located and use that as a basis for relative paths.

In A2K plus,

Application.CurrentProject.Path

(david)
 

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