Forum Discussion
Query problem in Access
Up to this point, pretty much what you've described is expected.
This, however, suggests an option was set that you probably want to change.
Alike "C*".
That's the operator for a different version of SQL, not the default, or standard SQL syntax normally used in Access.
Check here:
If this checkboxes are ticked, that's probably the reason for the ALike operator instead of the Like operator being offered. Uncheck it and see if that doesn't correct the problem.
There was a check in Default for new databases which I unchecked but no change. This is what my instructor and your access video is telling me.
With a wild card, represented by the asterisk (*), placed after the C in the Criteria row. This tells Access, "I know the first letter but nothing after that. So give me all records with C at the beginning of the LastName data, regardless of how each one ends."
So click in the Criteria row, delete the C, and type:
C*
Don't put a space after the C—you're just typing the C and, immediately after it, the asterisk (*). That's it. Then press ENTER or click into another cell in the grid, and the following appears:
Microsoft did a repair on the program and nothing changed. I cannot get this to appear as it should. I don't know what the problem is. I replied yesterday but I guess I did it incorrect.
Thank you,
Tena
- George HepworthJun 10, 2020Steel Contributor
Okay, you corrected the problem with the ANSI 92 SQL syntax and you are still not getting results from the query with the appropriate syntax.
The next step is to verify that no other parameters exist in this query. (I've had that happen myself. You can't see all of the columns in the query in the query design grid because they are off to the right, not showing.)
If you can verify that, and still no results, please confirm that there are actually records in the table which have last names starting with C.
And finally, verify that the query is based on a single table (Volunteers), or if it joins Volunteers to another table that the result of that join to additional table(s) doesn't eliminate those records which would otherwise be returned.
- Tena_YoungerJun 10, 2020Copper Contributor
I spoke with someone in Microsoft and he saw the problem. Yes there are names in access which begin with C and still not working. He put me in touch with uservoice. I'll see what happens there.
Thank you,
Tena
- George HepworthJun 11, 2020Steel Contributor
Tena_Younger HOW did this support person "see" the problem?
You should be aware that UserVoice is NOT intended to be a place for requesting support or reporting problems. It is a place where you can submit suggestions or requests for new features in Access. I am not too confident that an Access support person who sent you there for this problem really has all that much relevant experience.
But you didn't address the possible reasons I offered for one particular query not to return the desired records. One was that there might not be values in the field that match your criteria. But the other is that you may be joining two (or more) tables in the query which results in the records you want not actually being available. Can you show us the ENTIRE SQL from this query?
Thank you.
- Tena_YoungerJun 11, 2020Copper Contributor
Hello George,
I see what you mean about uservoice. I don't understand what you mean about - The next step is to verify that no other parameters exist in this query. The following is the names in file: we have 3 names beginning with C.
I have 2 relationships Events ID, Locations, and Volunteers. They are to location Id and Volunteer numbers only. Is it possible you could look at my computer. i am a novice at most of this,
Thank you,
- George HepworthJun 11, 2020Steel Contributor
Tena_Younger As a volunteer participant in this forum, I would not be willing to do any sort of remote connection, sorry. The risk is too great for both of us to have either of us getting access to other people's computers, IMO.
Can you open this query to SQL view and copy the entire SQL Statement and paste it here? That'll be the quickest way, I think.
What we're looking for in addition to the WHERE clause is any JOINS between tables, or if there is only one table in the query.