TECHNICAL INFORMATION:
I have created a Report within Access 97.
Tables: 3 tables used via ODBC.
Query: 2 Queries are used, the second one being a query of the first. The Second query is linked to the Record Source of the Form (in Design View).
Form: The Form is opened via a command button on the Main switchboard form. It comprises one Combo box, listing a set of values that the user can select from and 2 unbound text boxes in which the user inputs 2 dates, (ie a date range). A command button on the form then generates the report.
Report: The Record Source property of the Report is linked to the second query.
The Report Header section comprises 3 labels and text boxes used to display the value selected and data input by the user on the form. (This is a requirement of the report).
All 3 have been linked to the form using Expression Builder within their respective Control Source Properties.
The Detail section's text boxes have all been selected from the Field List.
THE PROBLEM
When I input the first date and second date of the range into the text boxes on the form and then generate the Report via the command button, though the date range is displayed on the Report, the detail section shows dates that are outside of the range.
This is obviously because the Detail section is not linked to the query. I therefore reopened the second query in Design View, and in the Criteria row of the Date field, built the following, using Expression Builder:
Between [Forms]![frmOrdersAuth]![txtEnterFirstPODate] And [Forms]![frmOrdersAuth]![txtEnterLastPODate]
After saving the query and closing it. I then went to open the Form to select and input data. However, to my astonishment the form was completely blank, though in Design View, everything is displayed as it should be.
CONCLUSION:
On removal of the above Expression, the Form works fine again, but obviously the Detail section of the Report does
not display the corect date range. So I'm really none the wiser.
If I enter the above expression in the Parameters box and select the Date/Time as the Data Type - I just get an "Invalid Bracketing" Error Message, though after rechecking the expression entered within it, I can see nothing wrong with it.
I am currently going round in circles trying to get this to work, so if anyone out there can tell me where I'm going wrong and what I need to do to get it to work, it would be
very much appreciated.
Many Thanks
Antony
I have created a Report within Access 97.
Tables: 3 tables used via ODBC.
Query: 2 Queries are used, the second one being a query of the first. The Second query is linked to the Record Source of the Form (in Design View).
Form: The Form is opened via a command button on the Main switchboard form. It comprises one Combo box, listing a set of values that the user can select from and 2 unbound text boxes in which the user inputs 2 dates, (ie a date range). A command button on the form then generates the report.
Report: The Record Source property of the Report is linked to the second query.
The Report Header section comprises 3 labels and text boxes used to display the value selected and data input by the user on the form. (This is a requirement of the report).
All 3 have been linked to the form using Expression Builder within their respective Control Source Properties.
The Detail section's text boxes have all been selected from the Field List.
THE PROBLEM
When I input the first date and second date of the range into the text boxes on the form and then generate the Report via the command button, though the date range is displayed on the Report, the detail section shows dates that are outside of the range.
This is obviously because the Detail section is not linked to the query. I therefore reopened the second query in Design View, and in the Criteria row of the Date field, built the following, using Expression Builder:
Between [Forms]![frmOrdersAuth]![txtEnterFirstPODate] And [Forms]![frmOrdersAuth]![txtEnterLastPODate]
After saving the query and closing it. I then went to open the Form to select and input data. However, to my astonishment the form was completely blank, though in Design View, everything is displayed as it should be.
CONCLUSION:
On removal of the above Expression, the Form works fine again, but obviously the Detail section of the Report does
not display the corect date range. So I'm really none the wiser.
If I enter the above expression in the Parameters box and select the Date/Time as the Data Type - I just get an "Invalid Bracketing" Error Message, though after rechecking the expression entered within it, I can see nothing wrong with it.
I am currently going round in circles trying to get this to work, so if anyone out there can tell me where I'm going wrong and what I need to do to get it to work, it would be
very much appreciated.
Many Thanks
Antony