Use wildcards to get query results from data entered on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use a form to populate criteria data into a query.
I can have the query return specific data I enter into my form, but how do I
get the query to trun all data fields?
 
I am trying to use a form to populate criteria data into a query.
I can have the query return specific data I enter into my form, but how do I
get the query to trun all data fields?

I don't know what you mean with your
" how do I get the query to trun all data fields?"
so I'll go with your subject line.

As criteria in a query column:

Like "*" & forms!FormName!ControlName & "*"
will find all instances of a word or phrase in a field.

Like forms!FormName!ControlName & "*"
will find all instances of a field that begins with the word/phrase.

Like "*" & forms!FormName!ControlName
will find all instances of a field that ends with the word/phrase.
 
On Wed, 29 Sep 2004 09:29:05 -0700, Acess Trooubles <Acess
I am trying to use a form to populate criteria data into a query.
I can have the query return specific data I enter into my form, but how do I
get the query to trun all data fields?

Could you explain what you mean by "trun all data fields"?

If you want the form criterion to be used with wildcards, try a
criterion of

LIKE "*" & [Forms]![yourform]![yourcontrol] & "*"

placing whichever wildcards you want where you want them.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top