Stumped

  • Thread starter Thread starter Gerald
  • Start date Start date
G

Gerald

I am trying to create wha tI thought was going to be simple Form/Subform
with a couple of linked tables.

I ahve a parent table that involves name of product and the level of
complexity. Then I am trying to link it to the ingriediant talbe which is
created by selecting informaton from a third table via look-up.

I have the ingrediant table working and I can get the aprent tabel working
my problem is when I try to connect the two so that each ingrediant is
listed with parent product.

For instance this is an example of what I am trying to do:

Product A
Lvl 25

3 micro circuit boards
2 micro switches
10 polly alloy fittings
4 fasteners



But I am having problems getting the ingrediants to link to the product.. I
ahve tried setting a field in the prodct named ingr_ID that links to the
ingr_ID in my ingrediant table and then form a one to many relation. But I
always seem ot get relation in the revers order i.e. one ingrediant to many
product when it should be reveresed as my atomic level ingrediant are found
through look up and have a sperate tabel all together.

Any idead on where I am going so badly wrong?


Thank you

Gerald
 
Gerald said:
I am trying to create wha tI thought was going to be simple
Form/Subform with a couple of linked tables.

I ahve a parent table that involves name of product and the level of
complexity. Then I am trying to link it to the ingriediant talbe
which is created by selecting informaton from a third table via
look-up.
I have the ingrediant table working and I can get the aprent tabel
working my problem is when I try to connect the two so that each
ingrediant is listed with parent product.

For instance this is an example of what I am trying to do:

Product A
Lvl 25

3 micro circuit boards
2 micro switches
10 polly alloy fittings
4 fasteners



But I am having problems getting the ingrediants to link to the
product.. I ahve tried setting a field in the prodct named ingr_ID
that links to the ingr_ID in my ingrediant table and then form a one
to many relation. But I always seem ot get relation in the revers
order i.e. one ingrediant to many product when it should be reveresed
as my atomic level ingrediant are found through look up and have a
sperate tabel all together.
Any idead on where I am going so badly wrong?


Thank you

Gerald

The behavior you are looking for is controlled by the MasterLink and
ChildLink proeprties of the subform control. It has nothing to do with
table relationships other than the same fields are generally used in both.
 
I won't try to answer your question but will proffer some advice:

If your "level of complexity" can be reduced to a formula (if you can
unerringly calculate it) then it's best to calculate that number each
time you need it rather than to calculate it in your head or by other
means.

The form/subform paradigm seems like the way to go. The primary key
of the parent table should be the ForeignKay in the child table. In
the subform control the Link Master field would be the PrimaryKey and
the Link Child field would be the ForeignKey respectively which
contain the same value. FWIW I normally use an Autonumber PK which
will properly populate in the FK as a Long Integer.

Access Help steps you through the process of creating the
Form/Subform.

HTH
 
Thansk for the help by changing the whcih record was tracking the
information from my primary table ot the child table I was able to get the
result I was looking for.


Thanks again Gerald
 
Back
Top