How to refer to Current Database Name?

  • Thread starter Thread starter GaryS
  • Start date Start date
G

GaryS

I want to put the filename of the current database (i.e.,
*.mdb) into a label on the opening switchboard, but I
don't know how to reference it.

Thanks.
 
For A2K & AXP:

CurrentProject.Name

For A97 (also works in A2K and AXP):

Dir(CurrentDb.Name)

Both will show the "mdb" extension. If you don't want to show the
extension, use InStr and Left to manipulate either of the above statement.
 

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

Back
Top