I like to refer to a table ("Customers") in another database (db2.mdb) in my C drive using DAO code, how do I do it?
I know if I want to refer to the "Customers" table in current database (db1.mdb), I will use the following code:
Dim rs as Recordset
Dim db as Database
set db = Currentdb()
set rs = db.OpenRecordset("Customers", dbOpenDynaset)
....
(' Above code will get the rs from the current database.)
But now I want to get the recordset from the Customers table in db2.mdb under C drive, instead from my current database. How do I change the code (to replace the CurrentDb() )?
Thank you for help.
I know if I want to refer to the "Customers" table in current database (db1.mdb), I will use the following code:
Dim rs as Recordset
Dim db as Database
set db = Currentdb()
set rs = db.OpenRecordset("Customers", dbOpenDynaset)
....
(' Above code will get the rs from the current database.)
But now I want to get the recordset from the Customers table in db2.mdb under C drive, instead from my current database. How do I change the code (to replace the CurrentDb() )?
Thank you for help.