Alike

  • Thread starter Thread starter NAS
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top