Create your report like you normally would, than once you have verified the report is working correctly, follow these steps:
- Add your report using the form frmReports. In the field ReportID enter the file name of your report used in Access. In the Report Name field you will type the name users will see. For example, if your report file name is rptSales, than enter rptSales in the ReportID and Sales Report in the Report Name. It’s ok if both fields have the same name. Enter a detailed description in the Report Description field.
- Next, open the form frmReportCriteriaAssignment and select your report from the list along with the Criteria that report will use on the form. In the Criteria Label Name field enter a name for your criteria, (optional). For example, if your rptSales report is using OrderDate as the fieldname than you may wish to use Sales Order Start Date as your Criteria Label Name.
- In the Field Name field enter the actual field name to query against, in our example that would be OrderDate. If you need the field to be required, (have it turn yellow), check the flag Required. NOTE: Always include your criteria field in the data source of your report, otherwise you will get an error.
- Keep in mind in most cases that you use txtStartDate field, you will most likely want to use txtEndDate in order to have a range of dates for your report. If you only have one field to use as a criteria for the report, then use txtStartDate.
Was this answer helpful ? Yes / No