Run Report

pmckeown

New member
Local time
Today, 04:37
Joined
Feb 10, 2009
Messages
6
I have created a form which allows the user to select a date from a pop up calendar and then an area.

What I want is that when the user clicks on 'view report', that it will run a report using the two pieces of selected information. for example if they selected 04/04/09 for their date and Outside for their area, a report would appear showing everything from 04/04/09 onwards that has its area set to outside.

any ideas?
 
This can be done a few ways... you can filter it based on those values

http://www.techonthenet.com/access/reports/filter_rpt.php

OR

you can create a query that the report is based off of that uses those two fields on your form to return the results that you desire.

I think creating a query that the report is based off would be the best and easiest option.

I have created a query but how do i get the report to run off it ??
 
So in your query fields you will want to have the form values included in that..

In the query criteria for date you would want..

forms!yourformname.Yourdatefieldname

for area you would want..

forms!yourformname.Yourareafieldname

Changing the appropriate values in red of course
 
So in your query fields you will want to have the form values included in that..

In the query criteria for date you would want..

forms!yourformname.Yourdatefieldname

for area you would want..

forms!yourformname.Yourareafieldname

Changing the appropriate values in red of course

Ok I have that already done.

In my query is the following:

Code:
[Forms]![View Data Screen]![AreaCbo]
Code:
[Forms]![View Data Screen]![DateCbo]

So how do I get it know that when I click 'View Report' that it runs this query?? I am assuming thats what is meant to happen
 
Well, The report should be based off of that query. Then it will automatically run.
 

Users who are viewing this thread

Back
Top Bottom