More help needed with report that starts up with a form

JillWelch

Registered User.
Local time
Today, 00:00
Joined
Oct 31, 2002
Messages
18
I asked for help yesterday and appreciate the advice I got. However, I am still having a bit of trouble and need some clarification.

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.

Another member was kind enough to explain the correct procedure in great detail and this is what I did:

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.

Step 7 is where I ran into trouble. When I opened the report in design view, there was no option to select the query I used as the Record Source--it just looked normal. Is there something I missed?

As a result of this, my form does not pop up before the report runs. Instead, the codes I typed into the query, [Forms]![MyForm]![FundRaiser] and [Forms]![MyForm]![SelectYear] appear one after the other with boxes for me to type in values. The report gives the information I need by this method, however, I need the more readable form that I created to show up (instead of these codes in seperate boxes) so that other users in the office know what they are supposed to enter.

Sorry this post was so long, I just wanted to be very clear. Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom