I have a query that pulls information from three tables:
tblEquipConsCode (table basically lists types of equipment - e.g. sampling supplies)
ECPK
ECCodeDescription
ECDefaultUnit
tblProjectEquipCons (table captures the project specific equipment and rates)
PECPK
ProjectFK (ties into my Project table)
ECFK (Foreign Key from above table)
PECRate
PECUnit
tblEquipConsReport (table captures details of each use of equipment)
ECRPK
ECDate
PECFK (Foreign Key from above table)
ECQuantity
ECComment
CELFK (ties into another table, basically a sub-project of the Project table)
I am using this query as the row source of a combo box on my form and the control source is PECFK.
In another field, I have ProjectFK. When I try to filter my combo box to only show the equipment from a certain project (using [Forms]![FormName]![FieldName]), I run into problems. My combo box list comes up blank and when I try to exit or delete the record, I get the message "The Microsoft Access database engine cannot find a record in the table 'tblProjectEquipCons' with key matching field(s) 'PECFK'. It can't, of course, find this record because there is no such field in that table. I can't figure out why it keeps wanting to look in that table.
I'm hoping someone can help me figure this out. I imagine it is an obvious solution, but I've been working on it all afternoon and evening and just don't get it.
Thanks,
Jennifer
tblEquipConsCode (table basically lists types of equipment - e.g. sampling supplies)
ECPK
ECCodeDescription
ECDefaultUnit
tblProjectEquipCons (table captures the project specific equipment and rates)
PECPK
ProjectFK (ties into my Project table)
ECFK (Foreign Key from above table)
PECRate
PECUnit
tblEquipConsReport (table captures details of each use of equipment)
ECRPK
ECDate
PECFK (Foreign Key from above table)
ECQuantity
ECComment
CELFK (ties into another table, basically a sub-project of the Project table)
I am using this query as the row source of a combo box on my form and the control source is PECFK.
In another field, I have ProjectFK. When I try to filter my combo box to only show the equipment from a certain project (using [Forms]![FormName]![FieldName]), I run into problems. My combo box list comes up blank and when I try to exit or delete the record, I get the message "The Microsoft Access database engine cannot find a record in the table 'tblProjectEquipCons' with key matching field(s) 'PECFK'. It can't, of course, find this record because there is no such field in that table. I can't figure out why it keeps wanting to look in that table.
I'm hoping someone can help me figure this out. I imagine it is an obvious solution, but I've been working on it all afternoon and evening and just don't get it.
Thanks,
Jennifer