Alike

N

NAS

Whenever I try to add the "Like" filter to the criteria row of a query,
Access automatically changes it to "Alike" which doesnt pull any information.
Does anyone know why this occurs and how to prevent it? It has only recently
started to happen. I am using Access 2003 on Windows XP.
 
D

Dirk Goldgar

NAS said:
Whenever I try to add the "Like" filter to the criteria row of a query,
Access automatically changes it to "Alike" which doesnt pull any
information.
Does anyone know why this occurs and how to prevent it? It has only
recently
started to happen. I am using Access 2003 on Windows XP.


It sounds like you set the option "SQL Server Compatible Syntax (ANSI 92)".
That's on the Tables/Queries tab of the Tools -> Options... dialog. If that
box is checked, the acceptable wild cards are different, so your customary
"*" and "?" won't work any more. The ALike operator (for "ANSI Like") uses
"%" and "_" instead, if I recall correctly.

Unless it was your intention to use ANSI query syntax, remove the check from
that option box.
 
H

Hans Up

NAS said:
Whenever I try to add the "Like" filter to the criteria row of a query,
Access automatically changes it to "Alike" which doesnt pull any information.
Does anyone know why this occurs and how to prevent it? It has only recently
started to happen. I am using Access 2003 on Windows XP.

Access substitutes ALike for Like when your database option settings
include ANSI SQL 92 mode (SQL Server compatibility).

In that mode you use different wildcard characters: % instead of *; and
_ instead of ?

You can revert to Like comparisons with * and ? if you drop SQL Server
compatibility from your database options. You will have to close and
re-open the database for that change to take effect.
 

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

Similar Threads


Top