I have a subform with a combo box that will not add a record. The form's record source is tblRetreadDetai ls.
tblRetreadOptio ns structure:
RetreadOptionsI D
Brand
Tread
Style
TreadDepth
The relationship is one(tblRetreadO ptions) to many(tblRetread Details).
The combo's control source is RetreadOptionsI D.
The combo's rowsource is:
When trying to add a record I get an error message:
"You cannot add or change a record because a related record is required in tblRetreadOptio ns".
The record is in the table or it would not be an option in the combo. What am I missing?
Thanks!
Code:
tblRetreadDetails structure: RetreadDetailsID Autonumber, Primary key RetreadID Number, foreign key to tblRetreads TireID Number, foreign key to Tires table RetreadOptionsID Number, foreign key to tblRetreadOptions
RetreadOptionsI D
Brand
Tread
Style
TreadDepth
The relationship is one(tblRetreadO ptions) to many(tblRetread Details).
The combo's control source is RetreadOptionsI D.
The combo's rowsource is:
Code:
SELECT DISTINCT tblRetreadOptions.RetreadOptionsID
, tblRetreadOptions.Tread
, tblRetreadOptions.Brand
, tblRetreadOptions.Style
, tblRetreadOptions.TreadDepth
FROM tblRetreadOptions
WHERE (((tblRetreadOptions.Brand)
=[forms]![frmRetreads]
![frmRetreadDetails].[form]
![cboRetreadBrand]))
ORDER BY tblRetreadOptions.Tread;
"You cannot add or change a record because a related record is required in tblRetreadOptio ns".
The record is in the table or it would not be an option in the combo. What am I missing?
Thanks!
Comment