Help please

  • Thread starter Thread starter erick-flores
  • Start date Start date
E

erick-flores

Hello all

I am creating a form thats has as the record source two linked tables.
I realized that when you have a link table you can not change the
information while the form is loaded. But when you have only one table
(as the record source for the form) then you can change the information
while the form is loaded.

My question is, is there anyway I can have two tables (linked) and be
able to change the information while the form is loaded? or this can
only be done with one table as the record source?

Thanks in advance
 
Hello all

I am creating a form thats has as the record source two linked tables.
I realized that when you have a link table you can not change the
information while the form is loaded. But when you have only one table
(as the record source for the form) then you can change the information
while the form is loaded.

That is not the case. If the "one" side table has a Primary Key that
is used as the link field, joined to a foreign key field in the second
table, with the Relationships window used to enforce referential
integrity, then the two-table query *will* be updateable.
My question is, is there anyway I can have two tables (linked) and be
able to change the information while the form is loaded? or this can
only be done with one table as the record source?

The most common way to do this is to use a Form for the "one" side
table, with a Subform for the "many". This allows you to see the
one-side data once (instead of repeating as many times as there are
child records) and still keep the two tables in synch.

John W. Vinson[MVP]
 
Erick,
If tblOne is related to tblTwo in a One to Many relationship, then the main form would
be based on tblOne, and a separate continuous subform on that form based on tblTwo. Link
them via the Parent/Child of the form, and then you can edit/add to both the main form and
the subform records without key field violations.
A main form can be based on two linked tables, as long as the relationship is One to
One. That's "usually" not done though as two tables One to One really means the second
table's fields should just be included in table1.
I did have a One to One once when a very data intensive table would have come very
close to 256 fields.
 
Thanks for your replies. I created a subform for my second table and
everything is working fine :-)
 
Back
Top