Hi,
I setup a generic report just to count the number of table entries by a particular field. E.g. Count of sales by product.
I then hoped to open this report using the Docmd.OpentReport and specify further criteria (strCondition) for the report.
DoCmd.OpenReport strReportName, acViewPreview, , strCondition
This doesn't work - I think because I have got an aggregate function in the report which it is calling.
Is there any other way to achieve the same result? - i.e. have a generic report (which contains an aggregate function) and pass further criteria to this using openreport or otherwise???
Is it possible to achieve the following in Access:
1. Create a SQL Statement.
2. Run the SQL Statement and send the results to a Report or Microsoft Excel document without having to have a report or query created.
Any help would be greatly appreciated.
Thanks
I setup a generic report just to count the number of table entries by a particular field. E.g. Count of sales by product.
I then hoped to open this report using the Docmd.OpentReport and specify further criteria (strCondition) for the report.
DoCmd.OpenReport strReportName, acViewPreview, , strCondition
This doesn't work - I think because I have got an aggregate function in the report which it is calling.
Is there any other way to achieve the same result? - i.e. have a generic report (which contains an aggregate function) and pass further criteria to this using openreport or otherwise???
Is it possible to achieve the following in Access:
1. Create a SQL Statement.
2. Run the SQL Statement and send the results to a Report or Microsoft Excel document without having to have a report or query created.
Any help would be greatly appreciated.
Thanks