How to Fix Microsoft Access Runtime Error 3075 for Text Criteria
Question details
The user needs to resolve runtime error 3075 in Microsoft Access, which is triggered when building a report filter or query via VBA.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Constructing a report filter or SQL query in VBA where a specific text field is used as the filter criteria.
- Observed behavior
- Access triggers runtime error 3075 because the text criteria are interpreted as numeric values due to missing quotation marks in the VBA string.
Before modifying your database's VBA code or SQL queries, open the Access query designer in SQL View to test your criteria syntax and pinpoint where the formatting issue occurs.
Enclose Text Criteria in Single Quotation Marks in VBA
Update your VBA code to wrap text string variables in single quotes so Access properly evaluates the criteria as text rather than numbers.
When passing a variable to a text field in an Access report filter or SQL string via VBA, you must enclose the string value in single quotes. If the quotes are omitted, Access interprets the text as a numeric variable or object, leading to Error 3075.
In your Microsoft Access database, press Alt + F11 to open the Microsoft Visual Basic for Applications (VBA) editor.
Find the form, module, or report where the StrCriteria (or your specific filter string variable) is defined for the report filter.
Modify the filter string to include single quotes around the text variable. For example, change your code to: StrCriteria = "Model = '" & Me.cboModel & "'".
Save your VBA code, return to your Access database, and run the report again to verify that Error 3075 has been resolved.

Use a Numeric Primary Key for Filtering
Modify your filter logic to use a numeric ID rather than a text field, which avoids the need for complex string quoting in VBA.
Looking for a Lightweight Alternative for Your Office Documents?
While Microsoft Access is a specialized tool for complex databases, most of your daily spreadsheet, document, and presentation tasks can be accomplished effortlessly with WPS Office. It serves as a comprehensive, free, and highly compatible alternative to the Microsoft Office suite.
- 1. Download WPS Office: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install the software: Run the setup file and follow the straightforward on-screen instructions to install the suite.
- 3. Open existing Office files: Launch WPS Office and directly open your existing Word, Excel, and PowerPoint files with perfect formatting retention.

Frequently Asked Questions
Why does Runtime Error 3075 only happen with specific fields?
Error 3075 occurs when Access encounters a syntax error in a query expression. If you use a text data type field in your criteria but fail to enclose its value in single or double quotes, Access attempts to process it as a number or a system object, which triggers the runtime error.
How do I filter a subreport when the main report opens?
You can filter a subreport by linking it to the main report using the 'Link Master Fields' and 'Link Child Fields' properties in the subreport control. Alternatively, you can apply a specific filter to the subreport during the main report's 'On Load' event using VBA by referencing the subreport's specific controls.
Can I use the Access query designer to fix VBA SQL syntax?
Yes. The easiest way to verify correct syntax is to create a mock query in the Access query designer using your desired criteria. Then, switch to 'SQL View' to see exactly how Access formats the quotation marks and operators, which you can replicate in your VBA code.




