logo
search
Others

Fix Invalid Use of Property Error When Filtering Access Form by Combo Box

Amos GikundaAmos Gikunda Sep 27, 2026 869 views

Question details

The user encounters an 'Invalid use of property' error when attempting to filter a continuous form using RecordsetClone and a combo box value in Microsoft Access.

How to Fix Invalid Use of Property Error When Filtering an Access Form by a Combo Box
Product
Microsoft Access
Device & OS
not provided
Scenario
Filtering a continuous form by an EntityID selected from a combo box via VBA.
Observed behavior
Assigning an SQL string directly to RecordsetClone triggers an 'Invalid use of property' error instead of applying the desired data filter.
Before you start

Ensure you have the exact spelling for your combo box (e.g., Combo51) and the target field name (e.g., EntityID) before modifying your VBA code.

Solution 1Recommended

Use the Form's Filter Property

Instead of assigning SQL to RecordsetClone, use the built-in Filter and FilterOn properties to safely filter form records.

RecordsetClone is designed to create a copy of the form's underlying records, but it cannot be directly assigned an SQL string. To filter the form's view dynamically based on a combo box selection, you should apply the condition directly to the form's Filter property.

1
Open the VBA Editor

Open your Microsoft Access form in Design View, select the combo box, and navigate to the Event tab in the Property Sheet to open the After Update VBA event.

2
Apply the Filter

In the VBA editor, type the code `Me.Filter = "EntityID = " & Me.Combo51` to set the filter condition based on the combo box selection.

3
Turn on the Filter

Add the command `Me.FilterOn = True` immediately below to activate the filter.

4
Clear the Filter

To provide users with a way to remove the filter later, you can link a clear button to the command `Me.FilterOn = False`.

Use the Form's Filter Property
Alternative: Navigating Without Filtering: If your goal is to navigate to a matching record without hiding the other records on a continuous form, use RecordsetClone with the FindFirst method, and then synchronize the form Bookmark.
Free Microsoft Office alternative

Try WPS Office for Your Everyday Productivity Needs

While WPS Office does not include a direct database replacement for Microsoft Access, it provides a comprehensive, lightweight, and free alternative to Word, Excel, and PowerPoint. You can easily manage large datasets, apply data filters, and sort information effortlessly with WPS Spreadsheet without needing complex VBA code.

  1. 1. Download WPS Office: Visit the official WPS website and click 'Free Download' to get the latest version.
  2. 2. Install the Software: Run the downloaded installer and follow the simple on-screen instructions to complete the setup.
  3. 3. Manage Data with WPS Spreadsheet: Open WPS Spreadsheet to import, filter, and sort your data using intuitive built-in tools.
Highly compatible with Microsoft Excel (.xlsx), CSV, and text formats.Lightweight software that loads quickly on both older and newer devices.Familiar tabbed interface that makes switching from Microsoft Office easy and intuitive.Free to use for everyday document, spreadsheet, and presentation tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get 'Invalid use of property' when using RecordsetClone?

The RecordsetClone property in Access creates a copy of the form's underlying recordset. It is read-only in terms of direct assignment; you cannot assign an SQL string to it. You must use its built-in methods like FindFirst instead.

How do I navigate to a record instead of filtering it?

To move to a specific record without hiding the others, use `Me.RecordsetClone.FindFirst "EntityID = " & Me.Combo51`, and then set `Me.Bookmark = Me.RecordsetClone.Bookmark`.

Can I filter based on a text string instead of a number?

Yes, but if the combo box value is text, you need to wrap the value in single quotes within your VBA code: `Me.Filter = "FieldName = '" & Me.ComboName & "'"`.