Hi everyone,
Is there a way to programmatically locate a database in a directory through VBA? For example, I have two Access 97 databases (front end and back end) that will be converted to XP shortly. As a process of the conversion, my company wants to eliminate any hard coded drive paths in the code so during deployment the package can deposit the databases to another drive location. In the code for the front end database it references compacting the back end database. For example:
DBEngine.CompactDatabase "W:\Recovery\Data\BackEndDB.mdb", "W:\Recovery\Data\db1.mdb"
Kill "W:\Recovery\Data\BackEndDB.mdb"
DBEngine.CompactDatabase "W:\Recovery\Data\db1.mdb", "W:\Recovery\Data\BackEndDB.mdb"
Kill "W:\Recovery\Data\BackEndDB.mdb"
The new location for the BackEndDB may not be in the data folder and certainly will no longer be in the W:\ drive. However, both the front end and back end databases will be in the same drive. Is there a way to search for a specific database name in a specific directory through vba? Thanks!
Is there a way to programmatically locate a database in a directory through VBA? For example, I have two Access 97 databases (front end and back end) that will be converted to XP shortly. As a process of the conversion, my company wants to eliminate any hard coded drive paths in the code so during deployment the package can deposit the databases to another drive location. In the code for the front end database it references compacting the back end database. For example:
DBEngine.CompactDatabase "W:\Recovery\Data\BackEndDB.mdb", "W:\Recovery\Data\db1.mdb"
Kill "W:\Recovery\Data\BackEndDB.mdb"
DBEngine.CompactDatabase "W:\Recovery\Data\db1.mdb", "W:\Recovery\Data\BackEndDB.mdb"
Kill "W:\Recovery\Data\BackEndDB.mdb"
The new location for the BackEndDB may not be in the data folder and certainly will no longer be in the W:\ drive. However, both the front end and back end databases will be in the same drive. Is there a way to search for a specific database name in a specific directory through vba? Thanks!