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
|
|||
|
|||
CRITERIA
I have a report and a sub report running from two queries for which the
criteria in both is Betweenn one date and another date. When running the report, I have to input the criteria beginning and ending date twice. Please for help so that I only input the criteria once. Thanks |
#2
|
|||
|
|||
CRITERIA
Use a form to run the report (via a command button). On the form, put two
textboxes, one for each of the date values. Format the textboxes for Short Date or any other date format you wish. Change the two queries so that they read the parameters from the form (keep it open while the report runs): [Forms]![NameOfTheForm]![NameOfTheTextbox] -- Ken Snell MS ACCESS MVP http://www.accessmvp.com/KDSnell/ "Christina" wrote in message ... I have a report and a sub report running from two queries for which the criteria in both is Betweenn one date and another date. When running the report, I have to input the criteria beginning and ending date twice. Please for help so that I only input the criteria once. Thanks |
#3
|
|||
|
|||
CRITERIA
Another approach is use a form containing two calendars (BegCalendar and
EndCalendar). Each calendar loads their respective global variables (BegDate and EndDate) during the Form_Unload or Form_Close events. I would also suggest that each global variable be loaded prior to opening the dual calendar form. Those variables can then be used to establish a default value for each calendar (such as today's date). The queries controlling the report cannot directly access these global variables but the queries can execute a function that returns the global variables (GetBegDate() and GetEndDate()). The dual calendar form can be opened as part of the procedure that opens the report. Using this approach eliminates the need to hold any form (including the dual calendar form) open while the report prints. Also the same dual calendar form can be used throughout the application for similar objectives since the dual calendar form is not tied to particular procedure within the application. Jack Cannon "Ken Snell (MVP)" wrote: Use a form to run the report (via a command button). On the form, put two textboxes, one for each of the date values. Format the textboxes for Short Date or any other date format you wish. Change the two queries so that they read the parameters from the form (keep it open while the report runs): [Forms]![NameOfTheForm]![NameOfTheTextbox] -- Ken Snell MS ACCESS MVP http://www.accessmvp.com/KDSnell/ "Christina" wrote in message ... I have a report and a sub report running from two queries for which the criteria in both is Betweenn one date and another date. When running the report, I have to input the criteria beginning and ending date twice. Please for help so that I only input the criteria once. Thanks |
Thread Tools | |
Display Modes | |
|
|