Which version of Access. In 2000 and later, all these work:
?CurrentProject.Path
C:\MSOffice2000\Office\Samples
?CurrentProject.Name
Northwind.mdb
?Currentdb.Name
C:\MSOffice2000\Office\Samples\Northwind.mdb
The last one also works in 97.
--
John Viescas, author
"Microsoft Office Access 2003 Inside Out" (coming soon)
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
Quote:
> Is there a way to recall the path to the current database in vba?
> I need to know the full path of the application, as it is packaged using
the
> packaging wizard, the user could potentially have installed it anywhere on
> their PC...
> Thanks
> Nick