V
Vincent DeLuca
Help! I have been trying to resolve this issue for about a day now.
I have parameters that work fine in a crosstab query, pulling the values from a dialog box that does not close when the button for the query (and also for a report I am about to talk about) are pressed. The query works fine as long as there is data for the entire range (from the specified StartingDate to the Specified EndingDate).
The problem I am having is in passing these values to a report. I have picked up bits and pieces that perhaps I can get the report using the parameters as specified in the Query that refer to the fields on the dialog box. Other places I have read that the parameters can be passed in the DoCmd.OpenReport Where clause. I have tried both methods and both together to no avail. When the report button is pressed, the parameter request boxes still pop up. The report will work fine if the values supplied in these boxes are for a date range that contains data for each date in two required tables (a different matter that I have resolved with some effort).
How can I get the report to pull the StartingDate and EndingDate from the Dialog box like the Crosstab query does? Here is my attempt at this solution that does not work (the Parameter requests still come up):
strDocName = "WeeklyPullsReport"
DoCmd.OpenReport strDocName, acViewNormal, , "[Date] BETWEEN [Forms]![EmployeePullsDialogBox]![StartingDate] AND [Forms]![EmployeePullsDialogBox]![StartingDate]"
I would appreciate any help anyone can offer.
Thank you.
Vincent DeLuca
I have parameters that work fine in a crosstab query, pulling the values from a dialog box that does not close when the button for the query (and also for a report I am about to talk about) are pressed. The query works fine as long as there is data for the entire range (from the specified StartingDate to the Specified EndingDate).
The problem I am having is in passing these values to a report. I have picked up bits and pieces that perhaps I can get the report using the parameters as specified in the Query that refer to the fields on the dialog box. Other places I have read that the parameters can be passed in the DoCmd.OpenReport Where clause. I have tried both methods and both together to no avail. When the report button is pressed, the parameter request boxes still pop up. The report will work fine if the values supplied in these boxes are for a date range that contains data for each date in two required tables (a different matter that I have resolved with some effort).
How can I get the report to pull the StartingDate and EndingDate from the Dialog box like the Crosstab query does? Here is my attempt at this solution that does not work (the Parameter requests still come up):
strDocName = "WeeklyPullsReport"
DoCmd.OpenReport strDocName, acViewNormal, , "[Date] BETWEEN [Forms]![EmployeePullsDialogBox]![StartingDate] AND [Forms]![EmployeePullsDialogBox]![StartingDate]"
I would appreciate any help anyone can offer.
Thank you.
Vincent DeLuca