Others

Add a Name Search to a Microsoft Access Switchboard Form

Bushra ParveenBushra Parveen Nov 14, 2026 868 views

Question details

The user wants to find a person's record by typing a name, without needing to know the database field name.

Add a Name Search to a Microsoft Access Switchboard Form
Product
Microsoft Access
Device & OS
not provided
Scenario
A switchboard or contact form needs a name-search control that remains useful as the database grows.
Observed behavior
Users should be able to select a person using a name and identifying details, then navigate to the record using a unique ID.
Before you start

Identify the contact table or query, its unique ID field, and the form that displays individual contact records. The examples use ContactID, FullName, Address, Contacts, and frmContacts; replace them with your actual names.

Solution 1Recommended

Find a record on a bound contact form

Use this method when the form containing the search control is bound to the contact records.

The combo box shows names and addresses but stores the unique ContactID. This helps distinguish people with the same name.

The form's Record Source must include ContactID, and the example assumes ContactID is a numeric field.

1
Add a combo box

Open the contact form in Design View. Add a Combo Box to the Form Header and name it cboFindPerson in the Property Sheet. Leave its Control Source blank so it does not change a field in the current record.

2
Configure the search list

In the combo box Property Sheet, set Row Source Type to Table/Query and Row Source to: SELECT ContactID, FullName, Address FROM Contacts ORDER BY FullName, Address; Set Column Count to 3, Bound Column to 1, and Column Widths to 0;2;3 to hide the ID while displaying the name and address. Set Auto Expand to Yes.

3
Add the navigation event

On the combo box Event tab, set After Update to [Event Procedure], click the build button, and add this VBA code inside the generated procedure: If IsNull(Me.cboFindPerson.Value) Then Exit Sub Dim rs As DAO.Recordset Set rs = Me.RecordsetClone rs.FindFirst "[ContactID] = " & CLng(Me.cboFindPerson.Value) If Not rs.NoMatch Then Me.Bookmark = rs.Bookmark rs.Close Set rs = Nothing

4
Test the search

Save the form and open it in Form View. Click the combo box, type the beginning of a name, and select the matching name and address. Confirm that the form moves to the intended record.

Find a record on a bound contact form
For large contact lists: Auto Expand helps users type the start of a name, but it does not reduce the number of rows in the list. For a very large database, consider filtering the combo box's Row Source before displaying results.
Free Microsoft Office alternative

Use WPS Office for everyday document and spreadsheet work

WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents and spreadsheets. Open compatible files to make migration easier; WPS Office does not create or run Access switchboard forms.

Use a familiar interface for common office tasksOpen and edit Microsoft Office formats such as DOCX, XLSX, and PPTXWork with contact lists in spreadsheets alongside your Access databaseUse a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why should the search use ContactID instead of the name?

Names can be duplicated or changed. Bind the combo box to the unique ContactID and display the name with another identifier, such as an address, so the selected ID identifies the intended record.

Can users find a person without knowing the field name?

Yes. In Form View, users can type the beginning of a name directly into the combo box and select a result; they do not need to choose or enter a database field name.

Why doesn't RecordsetClone move my switchboard to the contact?

RecordsetClone navigates records in the form containing the code. If the switchboard is unbound, use DoCmd.OpenForm with a ContactID WhereCondition to open a separate bound contact form.

What if my ContactID is text rather than a number?

The sample VBA uses CLng and is intended for numeric IDs. For a text ID, build a quoted text criterion and escape any embedded apostrophes before passing it to FindFirst or OpenForm.