Others

Use an Unbound Access List Box to Find a Matching Form Record

Tauseeq MagsiTauseeq Magsi Nov 27, 2026 870 views

Question details

Navigate a bound Access form to the record whose SORT value matches a selection in an unbound list box.

Use an Unbound Access List Box to Find a Matching Form Record
Product
Microsoft Access
Device & OS
not provided
Scenario
A form is bound to a table with a SORT field, while an unbound list box displays values from a separate query.
Observed behavior
Selecting a list box value should move the form to a record with the matching SORT value.
Before you start

Confirm the list box control name, the column containing the matching value, and whether the form's SORT field is text or numeric. Make sure the matching field is included in the form's record source.

Solution 1Recommended

Find the matching record with RecordsetClone and Bookmark

Use the list box's After Update event to search the form's records and move to the first match.

RecordsetClone searches the form's record source without moving the form until you assign the matching record's Bookmark. The example assumes the first list box column contains the value to match and SORT is a text field.

1
Open the event procedure

Open the form in Design View, select the list box, and open Property Sheet > Event. Set After Update to [Event Procedure], then select the ellipsis button to open the VBA editor.

2
Add the search code

In the generated After Update procedure, add the following code, replacing YourListBox and SORT with your control and field names: Dim rst As DAO.Recordset If IsNull(Me.YourListBox.Column(0)) Then Exit Sub Set rst = Me.RecordsetClone rst.FindFirst "[SORT]='" & Replace(CStr(Me.YourListBox.Column(0)), "'", "''") & "'" If Not rst.NoMatch Then Me.Bookmark = rst.Bookmark End If rst.Close Set rst = Nothing

3
Adjust for a numeric field

If SORT is numeric instead of text, replace the FindFirst line with: rst.FindFirst "[SORT]=" & Me.YourListBox.Column(0). Use the text version for a text field, even if its values look like numbers.

4
Test the selection

Save the form, switch to Form View, and select a list box value. The form should move to the first matching record; if no match is found, it stays on the current record.

Find the matching record with RecordsetClone and Bookmark
Check the list box column: Column(0) is the first column, even if it is hidden. Change the zero-based column index if the matching value is in a different column.
Free Microsoft Office alternative

Work with office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility for easier migration of documents, spreadsheets, and presentations. It does not run Access forms or fix Access VBA navigation.

Open and edit compatible Microsoft Word, Excel, and PowerPoint filesUse a familiar interface for everyday office tasksWork with tabular data in WPS SpreadsheetInstall a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Where should I put the navigation code?

In the list box's After Update event. In Design View, select the list box, open Property Sheet > Event, choose [Event Procedure] for After Update, and select the ellipsis button.

What happens if more than one record has the same SORT value?

FindFirst locates the first matching record in the form's recordset. Use a unique field as the match value if the form must navigate to one specific record.

Why doesn't the form move after I select a value?

Check that the selected list box column contains the expected value and that SORT is in the form's record source. The matching record must also be available in the form's current recordset; a filter can exclude it.

How do I match a value from the second list box column?

Replace Column(0) with Column(1) in the null check and FindFirst expression. Access list box column indexes start at zero, including hidden columns.