Current Directory code

N

Nick

I currently have my database code referencing the
database by using

Const DB = "c:\windows\perryni\DRisk.mdb"

is there any other way i can do this without writing the
specific path down as this database may be moved around.

Cheers

Nick
 
A

Alex Dybenko

instead of:
Const DB = "c:\windows\perryni\DRisk.mdb"

declare a variable:
dim DB as string
and initialize it:
db=currentdb.name

or just replace your constant DB with currentdb.name
 

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