D
dynalt
Objective: Create a form that will allow a list of values to be displayed
where each item is from yet another table.
Tables:
tblMain
MainID Autonumber (PK)
.. . .
tblPartsList
MainID (PK)
PartID (PK)
Q: Is this the best way to implement the one-to-many relationship? I have
seen this done with a single autonumber as a PK and MainID and PartID as
data, but I don't see any advantage -- it seems that an index is needed
either way.
tblParts
PartID Autonumber (PK)
PartName Text
PartDesc Text
Subform:
The subform should display a list of PartName, PartDesc matching MainID from
the parent form.
I want to add or delete parts from the list on the subform, but not edit the
fields in tblParts.
There are few enough entries in tblParts that a combobox could be used to
select a new part by PartName.
I have several similar one-to-many relationships to tables of possible values.
This seems like the same structure as an order - line item, but neither the
books I have available or Google queries turn up an answer.
Q: Is there a resource that details how to do this?
When I develop a query from tblMain.MainId -> tblPartsList.PartID ->
tblParts, I can get a table with the correct values, but I can't seem to link
it correctly, since the fields dropdown in Link Master / Children has only
bound controls and doesn't include MainID.
Q: How do I link the subform / query correctly?
Q: Can I use a combobox by PartName to add parts to tblPartsList? I can
create the combobox, but how does it get associated with the field in the
datasheet on the subform?
where each item is from yet another table.
Tables:
tblMain
MainID Autonumber (PK)
.. . .
tblPartsList
MainID (PK)
PartID (PK)
Q: Is this the best way to implement the one-to-many relationship? I have
seen this done with a single autonumber as a PK and MainID and PartID as
data, but I don't see any advantage -- it seems that an index is needed
either way.
tblParts
PartID Autonumber (PK)
PartName Text
PartDesc Text
Subform:
The subform should display a list of PartName, PartDesc matching MainID from
the parent form.
I want to add or delete parts from the list on the subform, but not edit the
fields in tblParts.
There are few enough entries in tblParts that a combobox could be used to
select a new part by PartName.
I have several similar one-to-many relationships to tables of possible values.
This seems like the same structure as an order - line item, but neither the
books I have available or Google queries turn up an answer.
Q: Is there a resource that details how to do this?
When I develop a query from tblMain.MainId -> tblPartsList.PartID ->
tblParts, I can get a table with the correct values, but I can't seem to link
it correctly, since the fields dropdown in Link Master / Children has only
bound controls and doesn't include MainID.
Q: How do I link the subform / query correctly?
Q: Can I use a combobox by PartName to add parts to tblPartsList? I can
create the combobox, but how does it get associated with the field in the
datasheet on the subform?