Open Different Database, Then Fill Fields

craigachan

Registered User.
Local time
Yesterday, 21:07
Joined
Nov 9, 2007
Messages
285
I'm wondering how to code opening a different database, then fill in some fields in the other database. I can use ShellExecute to get the other database open but I'm not sure how to fill in some fields on the newly opened DB. Can anyone help me?
 
You don't need to open another db. but, link the table from another db. and try to do it with UPDATE QUERY, or APPEND QUERY.
 
to link a table (in Access 2007 - i don't have and not used previous versions) in another database, go to the "External Data" ribbon. In the "Import" section, click on "Access", then choose the option "Link to the data source by creating a linked table", then browse for that database that you want to access the table from. click OK.

now access will display all the tables in that other database. select as many as you like, click ok, and you will now see an icon for that table in your asset pane, but unlike the other table icons in your database, this one will have a little arrow on it, indicating it's a linked, not resident, table.

HTH

edit: if you want to remove the link, just click on the table and press your keyboard delete button. access will then ask if you want to break the link.

edit2: this is, as far as i'm aware, how you 'link' a "front end" (FE) database to a "back end" (BE) database - sometimes known as a "split" database. a database is often split when multiple users are intended (most popularly, a BE resides on a communal server and each user gets a copy of the FE on their own machine - there are also various ways to update FEs in this config), though some people make a "front" and "back" end for single users too.
 
I guess I wasn't quite being clear on what I wanted to do. I have a db2.form2 that I want to use. I'm not sure I can successfully import it into db1 to use. So I want to open db2.form2 from a button on db1.form1, and then fill in the pertinant info from db1.form1 on db2.form2 and run db2.form2. Is this possible?
 
what you can do is first link to the table as specified, then just make a new form (depending on complexity) or simply copy and paste the form from the other database straight into your current database, then just make sure your new form uses the linked table (via a query) as it's source. there may be other adjustments involved, but without knowing more about your setup it's hard to say. try playing around with these ideas and see how you go, or post both your databases for us to look at.
 

Users who are viewing this thread

Back
Top Bottom