Fix a Microsoft Access Combo Box Opening the Wrong Record
Question details
Prevent a search combo box from navigating an Access form to the wrong record when its value is empty or does not match a record.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user selects a value in a form's search combo box to find and display a matching record.
- Observed behavior
- The form can display the first record when the combo box is Null or the code checks EOF instead of confirming that FindFirst found a match.
Open the form in Design View and identify the search combo box, its bound column, and the matching field in the form's record source. The example below assumes the bound value and Interment_ID are numeric.
Check for Null and NoMatch before changing the form record
Use a DAO RecordsetClone to navigate only when the combo box contains a value and FindFirst finds a matching record.
FindFirst sets NoMatch when it cannot find a record; EOF is not the appropriate test for this result. Avoid using Nz to convert an empty selection to zero, because zero could be treated as a search value.
In Access, open the form in Design View, select the search combo box, and open its Property Sheet. On the Event tab, set After Update to [Event Procedure] and click the ellipsis button.
In the VBA editor, replace the event procedure's body with the following code, keeping the existing procedure declaration and End Sub: Dim rs As DAO.Recordset If Not IsNull(Me!ComboFindInternee) Then Set rs = Me.RecordsetClone rs.FindFirst "[Interment_ID] = " & Me!ComboFindInternee If Not rs.NoMatch Then Me.Bookmark = rs.Bookmark rs.Close Set rs = Nothing End If
Replace ComboFindInternee and Interment_ID with your combo box and field names if they differ. Save the form, open it in Form View, and test a matching selection, a cleared selection, and an unmatched value.

Work with Office documents using WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Microsoft Office formats, making it easy to move everyday document, spreadsheet, and presentation work. It does not fix Access forms or replace Access database functionality.

Frequently Asked Questions
Why should I use NoMatch instead of EOF after FindFirst?
FindFirst sets the recordset's NoMatch property when no record meets the criteria. Check If Not rs.NoMatch before assigning rs.Bookmark to the form.
What happens when the combo box is cleared?
The IsNull check skips FindFirst and leaves the form on its current record. This avoids converting an empty value to zero or building invalid numeric search criteria.
Where do I put the VBA code?
Open the form in Design View, select the combo box, and use Property Sheet > Event > After Update > [Event Procedure]. Click the ellipsis button to open the VBA editor.
Can I use this code to search for a text ID?
The example assumes a numeric bound value. For a text ID, build FindFirst criteria with the value enclosed in quotes and escape any quote characters within the value.




