Search Multiple Queries w/ One Search parameter

  • Thread starter misschanda via AccessMonster.com
  • Start date
M

misschanda via AccessMonster.com

I would like to use one search parameter; more than likely product name to
search multiple queries on a single form. Possible?

Thanks
LA
 
J

Jerry Whittle

Yes. Put the search parameter in a text box on a form. Then in the criteria
of the appropriate fields in the queries, put something like below that calls
on the text box.

[Forms]![frmParameter]![txtParameter]

You could also put a button on the form to run code or a macro which will
open all the queries.

The form must remain open for this to work. It can be minimized or even
invisable though.
 
M

misschanda via AccessMonster.com

Thanks will try now!


Jerry said:
Yes. Put the search parameter in a text box on a form. Then in the criteria
of the appropriate fields in the queries, put something like below that calls
on the text box.

[Forms]![frmParameter]![txtParameter]

You could also put a button on the form to run code or a macro which will
open all the queries.

The form must remain open for this to work. It can be minimized or even
invisable though.
I would like to use one search parameter; more than likely product name to
search multiple queries on a single form. Possible?

Thanks
LA
 
M

misschanda via AccessMonster.com

Jerry,
In the criteria for the queries I inserted: [forms]![CurrentProducts]![Text26]

On the form, for the new field text26 i inserted: [Enter Product Name] in
the Control Source As the Parameter.
When ran I am not prompted for the product name and inside text box 26 i am
given an error " #Name?"
What did I do wrong??

Thanks
LA

Jerry said:
Yes. Put the search parameter in a text box on a form. Then in the criteria
of the appropriate fields in the queries, put something like below that calls
on the text box.

[Forms]![frmParameter]![txtParameter]

You could also put a button on the form to run code or a macro which will
open all the queries.

The form must remain open for this to work. It can be minimized or even
invisable though.
I would like to use one search parameter; more than likely product name to
search multiple queries on a single form. Possible?

Thanks
LA
 
J

John Spencer

You should leave the control source for the control (Text26) blank.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

misschanda via AccessMonster.com said:
Jerry,
In the criteria for the queries I inserted:
[forms]![CurrentProducts]![Text26]

On the form, for the new field text26 i inserted: [Enter Product Name] in
the Control Source As the Parameter.
When ran I am not prompted for the product name and inside text box 26 i
am
given an error " #Name?"
What did I do wrong??

Thanks
LA

Jerry said:
Yes. Put the search parameter in a text box on a form. Then in the
criteria
of the appropriate fields in the queries, put something like below that
calls
on the text box.

[Forms]![frmParameter]![txtParameter]

You could also put a button on the form to run code or a macro which will
open all the queries.

The form must remain open for this to work. It can be minimized or even
invisable though.
I would like to use one search parameter; more than likely product name
to
search multiple queries on a single form. Possible?

Thanks
LA
 
M

misschanda via AccessMonster.com

I am not understanding where the parmater is entered....
i am kinda new... please bare w/ me
Under the properties of the text box there are the following headings: format,
data, event, other, and all.. Is it in one of these categories that the
information is entered..
LA

John said:
You should leave the control source for the control (Text26) blank.
Jerry,
In the criteria for the queries I inserted:
[quoted text clipped - 29 lines]
 
J

John Spencer

You do not enter anything in the properties of the control.

When the form is open in input mode you will type the value you want as
criteria into the control.

In the query, the parameter would be

[Forms]!]The Name of your form]![The name of the control on the form]

If the form is open the query will be able to get the value that is typed
into the control and use that.

In the query grid (design view), I would expect to see
Field: SomeField
Criteria: [Forms]!]The Name of your form]![The name of the control on the
form]


If you typed"Socrates" into the control on the form and then run the query
it would search the field for "Socrates" and return records with that value
in that field.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

misschanda via AccessMonster.com said:
I am not understanding where the parmater is entered....
i am kinda new... please bare w/ me
Under the properties of the text box there are the following headings:
format,
data, event, other, and all.. Is it in one of these categories that the
information is entered..
LA

John said:
You should leave the control source for the control (Text26) blank.
Jerry,
In the criteria for the queries I inserted:
[quoted text clipped - 29 lines]
Thanks
LA
 
M

misschanda via AccessMonster.com

YES IT WORK... THANKS!!!
John said:
You do not enter anything in the properties of the control.

When the form is open in input mode you will type the value you want as
criteria into the control.

In the query, the parameter would be

[Forms]!]The Name of your form]![The name of the control on the form]

If the form is open the query will be able to get the value that is typed
into the control and use that.

In the query grid (design view), I would expect to see
Field: SomeField
Criteria: [Forms]!]The Name of your form]![The name of the control on the
form]

If you typed"Socrates" into the control on the form and then run the query
it would search the field for "Socrates" and return records with that value
in that field.
I am not understanding where the parmater is entered....
i am kinda new... please bare w/ me
[quoted text clipped - 11 lines]
 
M

misschanda via AccessMonster.com

Last question hopefully,
Is it possible to search for more than one thing inside the box... Is it
possible to do a 'google' type search...
Currently I tried searching for Blue and Yellow
Together they return nothing
However seperate searches allows me to return all the records for Blue, and
when I filter can than sort out those w/ blue and yellow.
Can this be filter be reduce by inputing what is needed inside the text box???


Thanks
LA said:
YES IT WORK... THANKS!!!
You do not enter anything in the properties of the control.
[quoted text clipped - 21 lines]
 

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