Link a Form field to a Query's Criteria

G

Greenali

Trying to do a search via a form.
Is there a way to take a text field of a form and have whatever the user
inputs into that field, link or go into the criteria of a query.?
Then have the Form search result display what the query finds?
 
D

Douglas J. Steele

Put Forms![NameOfForm]![NameOfControl] as the criteria.

Note that the form must be open for this to work: Access will not open the
form for you.
 
G

Greenali

Thank you! I'm sorry I need clarification on this but,
[Name of Control]? Is that the name of my Text Box or the Control Source?
--
Thank you for your help,
Greenali


Douglas J. Steele said:
Put Forms![NameOfForm]![NameOfControl] as the criteria.

Note that the form must be open for this to work: Access will not open the
form for you.
 
D

Douglas J. Steele

It should be the name of the text box. (The generic term for text boxes,
check boxes, labels, list boxes, combo boxes and so on is "control")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Greenali said:
Thank you! I'm sorry I need clarification on this but,
[Name of Control]? Is that the name of my Text Box or the Control Source?
--
Thank you for your help,
Greenali


Douglas J. Steele said:
Put Forms![NameOfForm]![NameOfControl] as the criteria.

Note that the form must be open for this to work: Access will not open
the
form for you.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Greenali said:
Trying to do a search via a form.
Is there a way to take a text field of a form and have whatever the
user
inputs into that field, link or go into the criteria of a query.?
Then have the Form search result display what the query finds?
 
G

Greenali

Great! Thank you so much for your help. I will give this a try.
--
Thank you for your help,
Greenali


Douglas J. Steele said:
It should be the name of the text box. (The generic term for text boxes,
check boxes, labels, list boxes, combo boxes and so on is "control")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Greenali said:
Thank you! I'm sorry I need clarification on this but,
[Name of Control]? Is that the name of my Text Box or the Control Source?
--
Thank you for your help,
Greenali


Douglas J. Steele said:
Put Forms![NameOfForm]![NameOfControl] as the criteria.

Note that the form must be open for this to work: Access will not open
the
form for you.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Trying to do a search via a form.
Is there a way to take a text field of a form and have whatever the
user
inputs into that field, link or go into the criteria of a query.?
Then have the Form search result display what the query finds?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top