Report trouble

JillWelch

Registered User.
Local time
Today, 17:10
Joined
Oct 31, 2002
Messages
18
I have a report that is working correctly. It lists contributors and date donation was made for fundraisers 1, 2, and 3.

What I want is a box to pop up (before I see the list the report gives me) so that I can enter the fundraiser number and the year the donation was made.

For instance, I would like to enter "1" and "02" so that the report will give me a list of all the donations made for fundraiser 1 in the year 2002.

Right now, the report gives me all past donations for fundraisers 1, 2, and 3.

Any suggestions? Your help is appreciated.
 
1. Create a query based on the fund raiser table and save it.
2. Create a form with two unbound text boxes and a command button. Name one of the unbound fields FundRaiser and the other SelectYear. In the On Click event of the command button use code similar to this:

DoCmd.OpenReport "PutYourReportNameHere"

3. Save the form as MyForm.
4. Go back to the query and open it in design view. In the Criteria line for the FundRaiser column put code like this:

[Forms]![MyForm]![FundRaiser]

5. Put code like this in the top line of a blank column in the query: "sYear: Year([NameOfFieldWithDateOfFundraiser])" without the quotes.
6. In the criteria line of this column put code like this:

[Forms]![MyForm]![SelectYear]

7. Save the query. Open your report in Design View and select the query you just made as the Record Source for the Report. Save the report.

Now open your form MyForm and enter 1 into the FundRaiser control and 2002 in the SelectYear control. Clicking on the command button will open the report showing you the data you want if I have put this together correctly!

hth,
Jack
 
Thank you so much for your help!
 
You are welcome and I hope it worked for you. If you have a problem just let us know...

Good luck with your project!

Jack
 

Users who are viewing this thread

Back
Top Bottom