Link to home
Create AccountLog in
SQL

SQL

--

Questions

--

Followers

Top Experts

Avatar of DexterFan
DexterFan🇨🇦

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

User generated image
The query works as expected.

When I attempt to create the same query with VBA, I get the following error:

User generated image
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
Avatar of FlysterFlyster🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of DexterFanDexterFan🇨🇦

ASKER

Thank you. I had just reached the same conclusion and tested it. It worked.

Avatar of FlysterFlyster🇺🇸

Great minds thinking alike? Glad to help.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

SQL

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.