possible for mdb/adp to know what it is?

G

Guest

Hello,

Is it possible from vb to determin wether or not the database is an mdb or
adp? i need to return the name of the database and for mdbs its
currentdb.name but for adps its currentproject.name. I was hoping i could
wrap this in some sort of if/case statement so that i dont need to change to
code for other projects.

thanks.
 
D

Dirk Goldgar

Ben said:
Hello,

Is it possible from vb to determin wether or not the database is an
mdb or adp? i need to return the name of the database and for mdbs
its currentdb.name but for adps its currentproject.name. I was
hoping i could wrap this in some sort of if/case statement so that i
dont need to change to code for other projects.

You can use CurrentProject.Name (returns the filename without the path),
CurrentProject.FullName (returns name with path), and
CurrentProject.Path (returns the folder path only) in an MDB, too. So
as long as you know your application will be run under Access 2000 or
later, you don't need to use CurrentDb for this.
 
G

Guest

Thanks.

Guess i can easily put some code to check if the user is using an older
version of access or not.

Thanks again.
 
A

Albert D.Kallal

Hum...currentProject.name does return the name of a mdb, or mde file....

So, I not sure why you can't use current Project.Name in both cases?
 
G

Guest

Guess i can easily put some code to check if the user is using an older

If it is an older version of Access, you know it is not an ADP/ADE.

(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