Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to syntax Like *FormControlValue* correctly in criteria? 1

Status
Not open for further replies.

inso18

Technical User
Dec 30, 2006
147
IL
I've tried Like "*"&[Forms]![myForm]![myControl]&"*" with no success.
Please help.
 
You'll need quotes e.g.:
Code:
Like "[red]'[/red]*"&[Forms]![myForm]![myControl]&"*[red]'[/red]"
Hope this helps

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Nope, this doesn't work either.
 
What isn't working? Syntax error? Unexpected results?

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
the code you gave me is a query criteria and instead of selecting the correct records, it doesn't select any records at all, ie, it doesn't work correctly.
 
Use the .Text property then:
Code:
Like "*" & [Forms]![Form1]![Text7].[Text] & "*"

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
It does work in this way. Thanks!!

 
Glad I could help [smile]

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top