Primary/ Foreign key Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple query-based form on three tables- locations, equipment, and
results. For each location I have multiple equipment records, and for each
piece of equipment I want to be able to create a specific results record.

I have a query first linking the Locations and Equipment tables and then
another query linking the first query with the Results table.

There is a primary key linking locations and equipment (Location ID Auto#),
and then another linking the equipment to the results (Equipment ID Auto #).
The problem I'm having is that the Results table is not recording the
Equipment ID, so I'm recording data but its not referencing any equipment.

I'm sure its something easy. Thanks

- mat
 
You need to set a one-to-many relation in the Relations window. Select
Referential Integrity and Cascade Updates.
 
I'm sorry, I should have mentioned that I already have those selected. There
is a one-to-many relationship between both the locations and equipment table
and then equipment and results tables also.

Is there a problem with having a primary key for the location and equipment
 
Use several forms with subforms. If you are entering equipment then have
location in the main form and equipment in the subform.
If entering results the have equipment in the main form and results in the
subform.
 
Back
Top