Subforms

  • Thread starter Thread starter Mike D.
  • Start date Start date
M

Mike D.

Hi. I am relatively new to subforms ...

I would like to create a form that has two subforms. I
believe I
understand how to create this using the Form Wizard, but I
am not sure how to specify the table relationships.

For instance, with the main table, I have the auto-
generated ID. How do I tie this to the records in the two
other tables?

Any suggestions will be appreciated!

Thanks,
Mike.
..
 
The Primary Key for one table used in another table will create the
relationship between the two tables. This key is considered the foreign key.
The data in the secondary table's foreign key must match the key used in the
main table. if the primary key is autonumber, then the foreign key in the
other table must be classified with the datatype of number : Long integer.
If your third table is related to the main table, then you go through the
same process of adding the key used in the main table to the third table. If
the third table is related to the second table, then you must use that
tables primary key in the third table and relate the information. Again if
the second table's primary key is autonumber, then the third tables foreign
key entry will be number : Long Integer. If it is text, then you must match
the foreign key to the same datatype and size.

After all this is done. It is important that you link the tables within the
relationship window of Access and check 'Enforce referential Integrity'. If
you get the one to many (1 to infinity symbol) symbology, then you know your
data integrity will remain intact. If you don't do this, then garbage in is
garbage out.

If after reading this you are not sure what I am talking about, then do an
Internet search on these subjects:
Normalization
Database relationships
Data Integrity

These are just a few of the key concepts needed even before you attempt to
create an Access database.
 
Thanks for your help!
-----Original Message-----
The Primary Key for one table used in another table will create the
relationship between the two tables. This key is considered the foreign key.
The data in the secondary table's foreign key must match the key used in the
main table. if the primary key is autonumber, then the foreign key in the
other table must be classified with the datatype of number : Long integer.
If your third table is related to the main table, then you go through the
same process of adding the key used in the main table to the third table. If
the third table is related to the second table, then you must use that
tables primary key in the third table and relate the information. Again if
the second table's primary key is autonumber, then the third tables foreign
key entry will be number : Long Integer. If it is text, then you must match
the foreign key to the same datatype and size.

After all this is done. It is important that you link the tables within the
relationship window of Access and check 'Enforce referential Integrity'. If
you get the one to many (1 to infinity symbol) symbology, then you know your
data integrity will remain intact. If you don't do this, then garbage in is
garbage out.

If after reading this you are not sure what I am talking about, then do an
Internet search on these subjects:
Normalization
Database relationships
Data Integrity

These are just a few of the key concepts needed even before you attempt to
create an Access database.





.
 
Back
Top