Forum Discussion
Query problem in Access
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:
C* changes to Like C*, turning the wild card into search criteria Access understands
When I put Like in front of the C* it becomes Alike.
This is the info my professor sent me when I told her what was happening.
Access will put quotes around it because it's criteria in a text (short text) field. It should still work. Don't type like by yourself, just type the C* and let it go.
If you do that, does it return the record/s you expect? If not, is there criteria in any other column that could be contradicting the criteria you're trying to set?
Hi. One last time.
I assume that what you last posted is the instructions given to you in the tutorial. They look right, but what you and I need to focus on is the ACTUAL SQL in the query.
As I asked before, what we need to see is a copy-and-paste of that SQL from the query so we can help you adjust it. Can you provide that SQL (not a screenshot of the query grid, the actual SQL)?
It should look something like this:
SELECT Field1, Field2, Field3
FROM tblYourTableNameGoesHere
WHERE Field2 Like "C*"
Of course, yours will have the table and field names from your table, i.e. "tblVolunteer" and "LastName".
Thank you.
- Tena_YoungerJun 13, 2020Copper Contributor
OK. Thank you for all your help. I can now continue my class before we end in a couple of weeks.
- George HepworthJun 13, 2020Steel Contributor
Tena_Younger I'm not entirely sure how to make the option permanent because I don't know how it's being flipped back to ANSI92.
- Tena_YoungerJun 13, 2020Copper Contributor
I went to options again, removed the check mark and I am going into the query design to reenter the info again.
The info came up and the Like came in front of the C*. How can I be sure the check mark does not return again.
This is what i have been waiting for. Thank you.
- George HepworthJun 13, 2020Steel Contributor
What, specifically, did you do between the two screenshots?What I need is not statements of outcomes, (...can't get results...) but the actual steps taken.
Thanks.
- Tena_YoungerJun 13, 2020Copper Contributor
It is unchecked again. See attached.
It is checked again.
I cannot get results either way.
- George HepworthJun 13, 2020Steel Contributor
Tena_Younger The first suggestion we got was pretty simple and straightforward.
Close the accdb.
Close MS Access entirely.
Restart MS Access.
Open this accdb, but do NOTHING else.
Check the options again.
What do you see now?
- Tena_YoungerJun 13, 2020Copper Contributor
ok thanks,
- George HepworthJun 13, 2020Steel Contributor
What changed? If it was unchecked, and now it's again checked and greyed out so it can't be changed, something else has to be going on. I've never heard of anything similar and am at a loss as to why that might happen.
I am going to call on the cavalry and see if we can find some additional insight. - Tena_YoungerJun 13, 2020Copper Contributor
- George HepworthJun 13, 2020Steel Contributor
Tena_Younger Sorry, I keep forgetting we're just getting started. So your Options now look like this, correct?
If so, you should now be able to write a criteria as WHERE LastName Like "C*" and have it run correctly.