How can I filter my data by Region and State?

S

Saz

Hi,

I have this big table that includes
Donor ID, First Name, Last Name, Address, City, State, Postal Code,
Region and Amount Donate.

There are 7 regions; Northeast, Mid-Atlantic, Central, Southeast,
Mountain, Pacific.
And State : 51 state

So, I am looking to view the total number of donor by
1. Region
2. State
3. Region and State

Also I am trying to export the report by selecting each of these
options.

Thank you,
Saz
 
O

Olduke

Create a query including all of the fields you want in your report.
In the criteria line under "State" enter the following:
[Enter State]
Run the query. It will prompt you for the state. Type in the state and
click OK.
You should get a listing for all the donors for the state you entered.
You will require a separate query for regions.
 
S

Saz

Create a query including all of the fields you want in your report.
In the criteria line under "State" enter the following:
[Enter State]
Run the query.  It will prompt you for the state.  Type in the state and
click OK.
You should get a listing for all the donors for the state you entered.
You will require a separate query for regions.



Saz said:
I have this big table that includes
Donor ID, First Name, Last Name, Address, City, State, Postal Code,
Region and Amount Donate.
There are 7 regions; Northeast, Mid-Atlantic, Central, Southeast,
Mountain, Pacific.
And State : 51 state
So, I am looking to view the total number of donor by
1. Region
2. State
3. Region and State
Also I am trying to export the report by selecting each of these
options.
Thank you,
Saz- Hide quoted text -

- Show quoted text -

Can I do this on the form?
 
O

Olduke

The easiest way would be to create a macro.
The steps in the macro would be:
Open Query - the query discussed earlier that would control your report
Open Report - the name of the report. In the Filter box, enter the name of
the query you just opened. Set the Print function to Print Preview until
you're sure it's working correctly.
Close - Query - the query you opened in the opening line. No longer required.

Place a command button on the form to run the macro.

You will need separated macros and buttons to run the state report and the
region report.




Saz said:
Create a query including all of the fields you want in your report.
In the criteria line under "State" enter the following:
[Enter State]
Run the query. It will prompt you for the state. Type in the state and
click OK.
You should get a listing for all the donors for the state you entered.
You will require a separate query for regions.



Saz said:
I have this big table that includes
Donor ID, First Name, Last Name, Address, City, State, Postal Code,
Region and Amount Donate.
There are 7 regions; Northeast, Mid-Atlantic, Central, Southeast,
Mountain, Pacific.
And State : 51 state
So, I am looking to view the total number of donor by
1. Region
2. State
3. Region and State
Also I am trying to export the report by selecting each of these
options.
Thank you,
Saz- Hide quoted text -

- Show quoted text -

Can I do this on the form?
 
J

John W. Vinson

The easiest way would be to create a macro.
The steps in the macro would be:
Open Query - the query discussed earlier that would control your report
Open Report - the name of the report. In the Filter box, enter the name of
the query you just opened. Set the Print function to Print Preview until
you're sure it's working correctly.
Close - Query - the query you opened in the opening line. No longer required.

Place a command button on the form to run the macro.

You will need separated macros and buttons to run the state report and the
region report.

Actually, if the Query is used as the recordsource property for the report,
you simply need to open the report in Preview mode. It's not necessary to open
(or close) the query; the report will just use it directly.
 
O

Olduke

John W. Vinson said:
Actually, if the Query is used as the recordsource property for the report,
you simply need to open the report in Preview mode. It's not necessary to open
(or close) the query; the report will just use it directly.

If you don't tell the macro to close the query, it will still be on the
screen when you close the report. You won't be returned to the form.
 
O

Olduke

John W. Vinson said:
Actually, if the Query is used as the recordsource property for the report,
you simply need to open the report in Preview mode. It's not necessary to open
(or close) the query; the report will just use it directly.

Sorry, my computer hiccupped and I lost the reply window.

By opening and closing the query and using it as the filter for the report,
you can run several different different types of reports using your existing
report as a template. You won't have to do up a different report for state
and for region. You can use the same one.
 

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