Query uses ALike instead of Like?

galantis

Registered User.
Local time
Tomorrow, 04:31
Joined
Feb 10, 2005
Messages
32
Hi,

I was given a Access database to test. and I trying to find out why my query will swap 'Like' statement to 'ALike'?

e.g
SELECT DOCUMENT.TITLE
FROM DOCUMENT
WHERE (((DOCUMENT.TITLE) Like "work*"));

will automatically updates itself to
SELECT DOCUMENT.TITLE
FROM DOCUMENT
WHERE (((DOCUMENT.TITLE) ALike "work*"));

and then my result query does not work.

I did not know Access use Alike? could it be from previous Access version?


thanks,
Galantis
 
galantis said:
will automatically updates itself to

Could you explain this process in more detail please.

Does it change in front of your eyes?

Does it change when you run some code?

If it is the second option, could you post the code that you run please.
 
Just a thought.

Open your table in design mode, and change the field name "TITLE" to something along the lines of "fldTITLE" what you have done this, save it and change the name of the table itself from "DOCUMENT" to "tblDOCUMENT". this will remove any possibility that you are having conflicts with reserved words.

Obviously you will have to change the reference to the table and the field accordingly in your code.

Finally, make backups first!
 
Uncle Gizmo,

I ran the query in the Query Window/QBE. In the criteria row, I typed 'Like "work*" ', and it automatically change itself to Alike as soon as I clicked to another row.

I also exported the table to another database which I build myself, and it does not change itself to ALike, so I am thinking if this database I am testing was converting from previous version of Access?

Using MS Access 2000.
galantis.
 
Like "*work*"... the sting has to have an astrick before and after the word.
 
screen shots of QBE

notice the keyboard cursor.
 

Attachments

  • alike.JPG
    alike.JPG
    10.9 KB · Views: 288
  • like.JPG
    like.JPG
    58.8 KB · Views: 217
what if...

you just typed...*work* does access change from "like" to "alike"
 
yes, Access automatically change from Like to Alike when I click on another row.
 

Users who are viewing this thread

Back
Top Bottom