linking tables

J

Joey

I have two forms corresponding to two tables in my database. I have an id
variable in table 1 that is set to autonumber and the same variable in table
2 set as a long integer. I have built a relationship between the two tables.
Form 1 sends all of its data to table 1 and form 2 to table 2. My issue is
that when I enter data into the forms the data goes to the correct table,
however the tables are not correctly linked as I cannot see the id in table
2, nor can I see the data from table two when I expand the id in table 1.

Any ideas???
 
J

Jeff Boyce

Joey

A traditional approach to adding data to a "table2" when that data is
related to data in a "table1" is to use a main form/subform construction.

The main form is the form that displays your "parent" table's data (table1).

The subform points to table2, and is embedded in the main form.

The subform control (the control that actually holds the subform) has Parent
and Child properties that allow you to connect the subform to the main form
by the underlying shared fields.

Does this address your issue?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Joey

I tried dropping form 2 into form 1 as a subform and also creating a new form
and adding form 1 and form 2 as tabs.
In both cases, as before, I cannot link the id variables. I am sure I am
missing some piece of code, but can't for the life of me make it work.

Maybe I am not clear on where and how to link the parent child properties!

Could you elaborate no that issue?

Thanks,
 
L

Larry Linson

On the border of Subform Control, if the Property Sheet is not displayed,
right-click and select Properties. In that dialog box, probably under the
"Data" tab, you will see the "LinkMasterFields" and "LinkChildFields"
properties. That's where you specify the Fields that synchronize the data.

Larry Linson
Microsoft Office Access MVP



__________ Information from ESET Smart Security, version of virus signature database 4054 (20090505) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top