referencing a form in another access database (1 Viewer)

hawkpig

Registered User.
Local time
Today, 15:21
Joined
Jun 5, 2007
Messages
10
I was wondering if it is possible to set a variable in one database to be the value shown in a form on another database.

If I set the value in a textbox on a form on the backend DB, then I would like set a variable in the frontend code to equal that textbox value. Is that possible?


eg something like: "c:\my database.mdb" ! Forms ! Textbox.

Any ideas welcome.
 

Moniker

VBA Pro
Local time
Today, 09:21
Joined
Dec 21, 2006
Messages
1,567
Accessing an object in a separate DB is actually more complex than you think. If it's a FE/BE setup, then I'm not sure what the issue is, but if it's just a DB that you want to edit from within another DB, you can use something similar to this.

Note the example deletes all the objects in a remote DB, so don't just copy/paste it. Instead, look at how it connects to and then references the objects in a remote DB. You can use how it connects to a remote DB and then write your own code (probably using TableDef objects) to change the values of specific fields.
 

Users who are viewing this thread

Top Bottom