Help with syntax in vbasic like Query

edonahue

Registered User.
Local time
Today, 04:57
Joined
Apr 6, 2000
Messages
15
I have a form where a user can enter part of a description and press a button which will open a form using their input as a filter. I was using the filter by form, but ran into what appears to be a common problem that there is no easy way for an uneducated (or lazy) user to apply the filter.

The form and button work fine except that the user has to enter the * before and after the text they enter. I can't seem to get the syntax right so that the user doesn't have to enter the *.

Here is the statement I am using:
stLinkCriteria = "[AO_Description]like " & "'" & Me![Description] & "'"

Can someone please help me with the syntax of where/how to put the * into this statement?

Thanks!
 
Last edited:
stLinkCriteria = "[AO_Description] like '*" & Me.[Description] & "*'"
 
Thanks!

Thanks, Pat. You're the best!

Erika
 

Users who are viewing this thread

Back
Top Bottom