This problem just won't go away......

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
 
J

Jason Lepack

Emailed you with a sample. Continue the discussion here as I don't
really check my email often.
 
A

anthony.carter

Jason,

Thanks very much for your patience, hard work and time.

I've had a quick look and it seems shamefully straightforward.

Thanks again,

Regards,

Tony Carter
 
J

Jason Lepack

Tony,

One of the things that I want to highlight is the Relationships
screen. If you click Tools->Relationships you can see what is related
to what. I'm not sure if I mentioned that before.

And don't worry about feeling foolish. That's the way we learn... at
least that's the way I do. I look stupid then I get better. ;)

Cheers,
Jason Lepack
 
A

anthony.carter

Jason,

It was one of the first things I looked at! I'm currently delving into
the subform and its query builder. I'll come up for air presently.

cheers,

Regards,

Tony Carter
 

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