Get Db name only

  • Thread starter Thread starter TK
  • Start date Start date
T

TK

I am wondering if there is a way to send the db name only to a function? I
have tried sending CurrentDb.Name but that sends the entire path - I want
only the file name itself- e.g. MyDb.mdb
Is there a better, easier, faster way than looping through the path name
until you have eliminated all of the "\" marks?
Thanks in advance.
TK
 
And, for the sake of completeness, if you're using Access 97 or older (for
which the CurrentProject.Name will not work), you can use
Dir(CurrentDb.Name) to return only the file name.
 
Back
Top