Hi everyone,
I've placed a combo box on a form and asked Access to Find a record based on the selection within the form. Since I leveraged the Access Wizard to do this when adding the combo box, it drops in the following code.
Private Sub Combo31_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[empNum] = " & Str(Me![Combo31])
Me.Bookmark = rs.Bookmark
End Sub
When I select the value in the combobox (emp id# 123456), the form returns the first CLOSEST match (emp id# 1234). Is there a way to have access return the exact match instead of the first closest match it finds?
I've placed a combo box on a form and asked Access to Find a record based on the selection within the form. Since I leveraged the Access Wizard to do this when adding the combo box, it drops in the following code.
Private Sub Combo31_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[empNum] = " & Str(Me![Combo31])
Me.Bookmark = rs.Bookmark
End Sub
When I select the value in the combobox (emp id# 123456), the form returns the first CLOSEST match (emp id# 1234). Is there a way to have access return the exact match instead of the first closest match it finds?