LIKE -using a form control

acoon

New member
Local time
Today, 10:01
Joined
Dec 25, 2007
Messages
8
I have a form where the user types in a part of a name and then he can view the details of all the people that their name has that string.

But I am having trouble writing the query that will do this...I have tried using:
WHERE fieldname LIKE '*[forms]![formname]![controlname]*'

Hoping that if instead of the string I would give the control that has the string it will work.
But of course that doesnt work (the simple solution never works :o). and I guess that the syntax is different when using a control.
so...
What do I need to Write in order to make it work?
 
Try

Like "*" & [forms]![formname]![controlname] & "*"
 
It works...

Thanks for the help.
 

Users who are viewing this thread

Back
Top Bottom