
Setting path to location of current mdb file
Currentdb.Name gives you the full path to the database, so all you need to
do is parse the path from that.
e.g.
'Posted originally by Ken Getz
Function CurrentDbDir() As String
Dim strPath As String
strPath = CurrentDb.name
CurrentDbDir = Left(strPath, Len(strPath) - Len(Dir(strPath)))
End Function
Quote:
>I am developing a database application and will be providing a backup
>capability. I want to make the location of the backup the same as the
>location of the existing database. I have searched help but have been
>unable to find out how to do this. In VB you can use
>ChDrive App.Path
>ChDir App.Path
>Any suggestions?
>--
>Jon Dubke