This is the method I used to create the combo box:
1. Create a form called frmComboTest based on the Products table, and set the form's DefaultView property to Single Form.
2. Add an unbound combo box by using the Control Wizard. (To use the Control Wizard, make sure that the Control Wizards button is pressed in on the toolbox before you create the combo box.) In the Control Wizard dialog box, follow these steps:
a. Click the Find a record on my form based on the value I selected in my combo box button, and then click Next.
b. Include the ProductID and ProductName fields, and then click Next.
c. Click Finish.
The Control Wizard creates an event procedure similar to the following:Sub ComboNN_AfterUpdate()
'Find the record that matches the control.
Me.RecordsetClone.Findfirst "[ProductID] = " & Me![ComboNN]
Me.Bookmark = Me.RecordSetClone.Bookmark
End Sub
3. View the frmComboTest form in Form view. Note that when you choose a product name in the combo box, you are moved to the record selected.
THIS IS MY ACTUAL CODE:
Private Sub Combo34_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Me![Combo34])
Me.Bookmark = rs.Bookmark
End Sub
The Control Source is left blank.
I attempted to create the combo box again but I still get the error that I cannot search the field??
Jeannie