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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Query part of a field

Status
Not open for further replies.

JavaTurkey

Technical User
Dec 24, 2001
42
US
It's simple, but it ain't working.
I want to run a query on a table, based on input from a form. The part I can't get to work is I need it to query ANY part of the field. ie--> if I put "ll", it will bring up records containing Hello, Yellow, Hollow, etc. In the criteria for the query, I try

Like *[Forms]![Form1]![EnterMe]*
and
Like "*"[Forms]![Form1]![EnterMe]"*"

nothing works. If I just enter the string, it works fine (but queries the entire field) Am I missing a " or a () or something? thanks....
 
Java:

You will need to add & around the the formfield. Also, add .[Text] like so:

Like "*" & [Forms]![Form1]![EnterMe].[Text] & "*"
 
If you create query you may write:

Like "*" & [Forms]![Form1]![EnterMe] & "*"

Aivars



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top