Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Need help with the LIKE operator!

Author  Topic 

Essendon
Starting Member

2 Posts

Posted - 2001-10-25 : 23:04:00
Hi all,
Could anyone explain why the following LIKE statement:

Like "*adam*"

works well, on a single name field that includes first name and last name, returning results such as:
Adams Dane
Wright Adam
Thornber Adam
Adamson Geoff

But when I try to get user input (instead of using adam) from a form:

Like "*[Forms]![Query Dialog]![Name]*"

(name is a text field on the Query Dialog Form)

It wont work at all!

What changes to the above code need to be made to make it work like the first example?

I would appreciate any help...Thanks in advance,

Peter


   

- Advertisement -