If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Parameters in a Report.
I want to place a second report in a existing report. The
reports are based on a parameter query. The information that is prompted for is the same on both reports, a date range. When I put the second report in the exisiting report it always prompts me for the dates twice when I run the report. Is there anyway around this? |
#2
|
|||
|
|||
Parameters in a Report.
On Wed, 19 May 2004 16:35:24 -0700, Amy Johnson wrote:
I want to place a second report in a existing report. The reports are based on a parameter query. The information that is prompted for is the same on both reports, a date range. When I put the second report in the exisiting report it always prompts me for the dates twice when I run the report. Is there anyway around this? Create an unbound form. Add 2 Text Controls. Name one StartDate and the other EndDate. Set their Format property to a Date format. Add a command button. Code the button's click event: Me.Visible = False Name this form 'ParamForm'. In each query, in it's Date field's criteria line, write: Between forms!ParamForm!StartDate AND forms!ParamForm!EndDate Next, code the Main Report's Open event: DoCmd.OpenForm "ParamForm", , , , , acDialog Code the main report's Close event: DoCmd.Close acForm, "ParamForm" If you also wish to actually show the date range in the main report, add an unbound control to the report header. Set it's control source to: = "For Sales between " & forms!ParamForm!StartDate & " AND " & forms!ParamForm!EndDate When ready to run the report, open the report. The form will display and wait for the entry of the dates. Click the command button and the report will run without need for any further parameter entries. When the report closes, it will close the form. -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
#3
|
|||
|
|||
Parameters in a Report.
Amy,
I usually put my parameters into an unbound form and have the query(s) reference the form's controls. You have to keep the form open for the query(s) to run. Terry -----Original Message----- I want to place a second report in a existing report. The reports are based on a parameter query. The information that is prompted for is the same on both reports, a date range. When I put the second report in the exisiting report it always prompts me for the dates twice when I run the report. Is there anyway around this? . |
Thread Tools | |
Display Modes | |
|
|