Ad Hoc Queries

K

KateM

Hi,

I have a contacts/donor database that is finally working. Now I need to get
a bit fancy and am not sure how to let someone query the database as needed.

For example, if we need to send out a letter to certain people that are from
the Rochester Area and are non-profits, the query would return all the people
that had checks in the boxes.
How would I make this so that it can be used for many different types of
searches and easy for people who are basic Access users?

Thanks so much,
Kate
 
N

NathanJ

Kate,
Create a form with the criteria that will change between many different
searches and use a call to that form in the query to run the report.
For example you want to run two searches one for the people in
Rochester and one for the people in NYC

SELECT city FROM tblCities WHERE city = [Forms]![txtCity];

txtCity being the text box in the form you create.

Hope this helps,

-Struggleing student
 
K

KateM

Thank you, I will try that. That makes a lot of sense.
--
Center for Governmental Research
Research/Technology


NathanJ said:
Kate,
Create a form with the criteria that will change between many different
searches and use a call to that form in the query to run the report.
For example you want to run two searches one for the people in
Rochester and one for the people in NYC

SELECT city FROM tblCities WHERE city = [Forms]![txtCity];

txtCity being the text box in the form you create.

Hope this helps,

-Struggleing student
 
D

Duane Hookom

There is a complete "ad-hoc/qbf" applet available at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane.

You can import a few objects (tables, forms,...) into your mdb and implement
this solution.

--
Duane Hookom
MS Access MVP

KateM said:
Thank you, I will try that. That makes a lot of sense.
--
Center for Governmental Research
Research/Technology


NathanJ said:
Kate,
Create a form with the criteria that will change between many different
searches and use a call to that form in the query to run the report.
For example you want to run two searches one for the people in
Rochester and one for the people in NYC

SELECT city FROM tblCities WHERE city = [Forms]![txtCity];

txtCity being the text box in the form you create.

Hope this helps,

-Struggleing student

Hi,

I have a contacts/donor database that is finally working. Now I need to
get
a bit fancy and am not sure how to let someone query the database as
needed.

For example, if we need to send out a letter to certain people that are
from
the Rochester Area and are non-profits, the query would return all the
people
that had checks in the boxes.
How would I make this so that it can be used for many different types
of
searches and easy for people who are basic Access users?

Thanks so much,
Kate
 
Top