Accessing another access database from access
Posted on 2008-10-03
OK, pretty simple I think. I have a split DB with a FE (front-end) and a BE (back-end) database (thanks to some help in a previous question).
Now in the front end application I want to do the following:
When the main form opens, query the BE database and see if the latest record in the VERSIONS table matches my "hard coded" version in the FE. If so, display a button and have it execute a query to update the BE db, etc, etc.
So, I know how to do just about all of it accept access that external database. i know the code is something like this:
Dim db As Database
Set db = OpenDatabase(MyDB)
db.Execute "ALTER TABLE patient ADD COLUMN pMiddleName Text"
The DB is located in the SAME directory as the FE database, but I assume "MyDB" needs to be an absolute path, so I was looking for a function like Server.MapPath (a .asp function) - since I know it is in the same directory, but I won;t always know the absolute path.