A
anthony.carter
In response to a very lost soul the following was offered as the best
route to take.......
"A normalized design, if you're interested, is
to have 3 tables.
tbl_unit: (info about the unit)
unit_id - autonumber - PK
unit_name - text
anything else about the unit
tbl_test: (info about the test)
test_id - autonumber - PK
test_name - text
anythign else about the test
tbl_unit_test: (test of a unit)
unit_id - number - FK - PK
test_id - number - FK - PK
unit_test_datetime - date/time - PK
unit_test_result_value "
When information was entered into tbl_unit_test an error box appeared
claiming "You cannot add or change a record because a related record
is required in table"tbl_unit""
This then prompted the question........
"In the third table 'tbl_unit_test' there are two fields
'unit_id_number' and 'test_id_number'. Are these meant to be the same
as the unit_id_autonumber in table One (tbl_unit) and
test_id_autonumber in table Two (tbl_test)? If so, how are they
related ie. how would the id number in table Three be made to be the
same as in table One or Two? "
To which the reply given was.........
"Use a form. Link the form to the tbl_unit and then create a
subform.
Base the subform on tbl_unit_test. Link the subform to the main form
on unit_id. Create a combo box on the subform that looks up the
names
of the tests in tbl_test. Access will automatically include the PK.
Now whenever you select an item on the main form you will see all of
the tests performed for it. You can do the opposite as well and base
the main form on tbl_test and the subform on tbl_unit_test. Then you
see all of the units that have taken that test. "
Having been taught that if I don't ask stupid questions then I'll stay
stupid, here goes......
Just what is required to get the unit_id-number and test_id-number
into tbl_unit_test? (They have id numbers automatically generated in
the first two tables.). I have attempted to create the form mentioned
above but not much seems to have happened!
If any kind person can help could they please bear in mind that they
are dealing with a half-witted dimwit.
Thanks,
Regards,
TC
route to take.......
"A normalized design, if you're interested, is
to have 3 tables.
tbl_unit: (info about the unit)
unit_id - autonumber - PK
unit_name - text
anything else about the unit
tbl_test: (info about the test)
test_id - autonumber - PK
test_name - text
anythign else about the test
tbl_unit_test: (test of a unit)
unit_id - number - FK - PK
test_id - number - FK - PK
unit_test_datetime - date/time - PK
unit_test_result_value "
When information was entered into tbl_unit_test an error box appeared
claiming "You cannot add or change a record because a related record
is required in table"tbl_unit""
This then prompted the question........
"In the third table 'tbl_unit_test' there are two fields
'unit_id_number' and 'test_id_number'. Are these meant to be the same
as the unit_id_autonumber in table One (tbl_unit) and
test_id_autonumber in table Two (tbl_test)? If so, how are they
related ie. how would the id number in table Three be made to be the
same as in table One or Two? "
To which the reply given was.........
"Use a form. Link the form to the tbl_unit and then create a
subform.
Base the subform on tbl_unit_test. Link the subform to the main form
on unit_id. Create a combo box on the subform that looks up the
names
of the tests in tbl_test. Access will automatically include the PK.
Now whenever you select an item on the main form you will see all of
the tests performed for it. You can do the opposite as well and base
the main form on tbl_test and the subform on tbl_unit_test. Then you
see all of the units that have taken that test. "
Having been taught that if I don't ask stupid questions then I'll stay
stupid, here goes......
Just what is required to get the unit_id-number and test_id-number
into tbl_unit_test? (They have id numbers automatically generated in
the first two tables.). I have attempted to create the form mentioned
above but not much seems to have happened!
If any kind person can help could they please bear in mind that they
are dealing with a half-witted dimwit.
Thanks,
Regards,
TC