Forum Discussion
Query problem in Access
I am taking a college course of Access and my instructor told me what to do and I checked various ms access videos and was told the same info. Everything is going haywire with my office Access 365. When I click on Query design, I do not get the show table. No show table appeared and there was no show table button. I noticed Add tables appeared on the right side of the page and that was how i entered the table. But when I went to the criteria in the last name field and entered C*, it appears as "C*". The Like does not appear. If I add the like it appears as Alike "C*". I cannot do a criteria. What is wrong.
Thank you,
- George HepworthSteel Contributor
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.
- Tena_YoungerCopper Contributor
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 HepworthSteel 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.