Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find the current path (directory) of a MS Access database?

Tags:

vba

ms-access

I am writing VBA within my Access database and I need to reference the containing directory of this database. This path could change since I will be moving the database around.

like image 345
WestAce Avatar asked Mar 11 '15 01:03

WestAce


1 Answers

You will want to use the following code:

CurrentProject.Path

This will return a string representing the file path of the current directory.

like image 118
WestAce Avatar answered Nov 16 '22 01:11

WestAce