SQL
--
Questions
--
Followers
Top Experts
Access 2019 Query syntax error
I am using VBA code to create a query for a report. I have a field that has both numeric and alphanumeric data. I need to search for a range of values on this field. When I populate a query using query design view, it looks like

The query works as expected.
When I attempt to create the same query with VBA, I get the following error:

My 'where' clause end up like ([ProOrdNumber] = Between "7927" AND "7930") and somehow I am missing an operator.
Can anyone help me?
The query works as expected.
When I attempt to create the same query with VBA, I get the following error:
My 'where' clause end up like ([ProOrdNumber] = Between "7927" AND "7930") and somehow I am missing an operator.
Can anyone help me?
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
ASKER CERTIFIED SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Thank you. I had just reached the same conclusion and tested it. It worked.
Great minds thinking alike? Glad to help.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
SQL
--
Questions
--
Followers
Top Experts
SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.