Like Operator changing to ALike

G

Guest

When I enter in a Like operator (as I have on hundreds of other queries) and
then enter the Like [Enter name with *] or even an actual Like "Ros*" the
Like changes to ALike and I can not get any wildcard results only actuals.
I use Access 2002 SP3 is there a problem with it that I am unaware of. I
searched for another problem similar but couldn't find one.
 
A

Allen Browne

I am not seeing that behavior here in A2002 SP3. I am able to create a
query, using the Like parameter, and enter * as the wildcard at runtime, to
retrieve the correct records. And the Like operator does not replace itself
with ALike in SQL View.

My data is in Access tables. Are you using tables attached from a different
data source, such as SQL Server? If so, try using the % as the wildcard
instead of the asterisk.

The ALike operator is not documented anywhere that I know of. It behaves
like the Like operator of SQL Server, using % as the wildcard, but why you
are seeing your query automatically changing the operator is the worry.

If you are not using tables from a different data source, make sure you have
unchecked the boxes under:
Tools | General | Options | Name AutoCorrect
Then compact the database:
Tools | Database Utilities | Compact
Does it still misbehave?

For an explanation of why to disable Name AutoCorrect, see:
http://members.iinet.net.au/~allenbrowne/bug-03.html
 
G

Guest

I have the same problem and are using Access 2003. I have always used "Like"
to filter records in queryes, but Like changes to ALike and it does not work
the same way as before. When I refer to a field in a form (used as a filter)
and add * at the end (to show all records if the field dont contain any data)
i will recieve no records in result. Have you found any solution on this
problem?

For instance: ALike IIf([forms]![frmSysBackup]![SysVSData]=1;0;"*")

This filter should return records with boolean value False when the field
SysVSData = 1, and records with bouth True and False when field SysVSData <>
1.

OSTCranes skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top