I am having trouble finding the record I want on a form.
My form contains 2 combo boxes, a listbox, and 4 other text boxes. When the user selects a value from each of the combo boxes, a query is run to determine the listboxes contents. The listbox has 2 columns - one is hidden as it is the key field, the other is the boxnumber. The query is working fine and displays the correct result/s (ie the boxnumber), however I want to find the first record based on the code (hidden key field) as opposed to the boxnumber which it is currently doing. Can anybody please help me with this?
I have tried changing the bound column 2, and changing my code to:
rs.FindFirst "
My form contains 2 combo boxes, a listbox, and 4 other text boxes. When the user selects a value from each of the combo boxes, a query is run to determine the listboxes contents. The listbox has 2 columns - one is hidden as it is the key field, the other is the boxnumber. The query is working fine and displays the correct result/s (ie the boxnumber), however I want to find the first record based on the code (hidden key field) as opposed to the boxnumber which it is currently doing. Can anybody please help me with this?
I have tried changing the bound column 2, and changing my code to:
rs.FindFirst "
Code:
= '" & Me![List14] & "'"
It gave the following error- data type mismatch in criteria expression.