Variable

Rainbowhawk

Registered User.
Local time
Today, 18:08
Joined
Oct 8, 2007
Messages
54
I need to pass a variable from one Access Database to another

The senario is I have a item number in one database that I need to use to open a form in another database,

I can open the database using vba, currently launching a BAT file that copies the latest version database to a local drive and then opens it,

Is there an easy way to pass the variable after this has completed?
 
It's the DBEngine.OpenDatabase Method (DAO) that is your friend.

Basically, it's used in the same way that CurrentDb operates, but in this instance you actually refer to another database file from within your current open file. Once the connection is made accessing tables, retrieving data, is relatively easy.

Best if you check this link out first, it refers to Access 2013, from the look of this reference it appears the same as earlier versions but I'm sure you can search for those if need be.
 

Users who are viewing this thread

Back
Top Bottom