I have 2 tables with multiple-field primary keys; each record is uniquely identified by both a FarmerID field and a Crop field.
On the form for Table2, I'd like a combo box to show what fertilizer was entered for that record in Table1. I've tried the following code:
But the box only shows the fertilizer for the first record with that FarmerID in Table1, even when the crop is different.
Is there a way my form can show the correct fertilizer for each farmer/crop in Table1? Thank you.
On the form for Table2, I'd like a combo box to show what fertilizer was entered for that record in Table1. I've tried the following code:
Code:
=DLookup("[Fertilizer]","Table1","[FarmerID]AND[Crop] = " & [Forms]![Table2Form]![FarmerID]AND[Crop])
But the box only shows the fertilizer for the first record with that FarmerID in Table1, even when the crop is different.
Is there a way my form can show the correct fertilizer for each farmer/crop in Table1? Thank you.