Query uses ALike instead of Like? (1 Viewer)

galantis

Registered User.
Local time
Today, 11:09
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
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 04:09
Joined
Jul 9, 2003
Messages
16,302
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.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 04:09
Joined
Jul 9, 2003
Messages
16,302
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!
 

galantis

Registered User.
Local time
Today, 11:09
Joined
Feb 10, 2005
Messages
32
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.
 

tanski811

Registered User.
Local time
Yesterday, 20:09
Joined
Apr 8, 2005
Messages
24
Like "*work*"... the sting has to have an astrick before and after the word.
 

galantis

Registered User.
Local time
Today, 11:09
Joined
Feb 10, 2005
Messages
32
screen shots of QBE

notice the keyboard cursor.
 

Attachments

  • alike.JPG
    alike.JPG
    10.9 KB · Views: 239
  • like.JPG
    like.JPG
    58.8 KB · Views: 168

tanski811

Registered User.
Local time
Yesterday, 20:09
Joined
Apr 8, 2005
Messages
24
what if...

you just typed...*work* does access change from "like" to "alike"
 

galantis

Registered User.
Local time
Today, 11:09
Joined
Feb 10, 2005
Messages
32
yes, Access automatically change from Like to Alike when I click on another row.
 

Users who are viewing this thread

Top Bottom