Hi Forum, access 2010 accdb.
A Report has an option to be emailed by DoCmd.SendObject which means we can not use the normal Where clause to filter the data.
I got around this by using TempVars and checking for same in the Report Open Event.
A filter will then be used if so required.
This worked fine for a single report but is throwing error 3097 claiming the field could refer to more then one table.
The Report SQL does not indicate this to be the case.
The report has a sub report - could this be the issue ?
I resolved the issue by changing the record source instead of a filter.
The alternative record source is the same as the original one except for the criteria on one field that refers to the TempVars.
If the filter had a clash, why then doe the sql not throw the same error ?
If the sub report is the issue, again why does the record work ?
Could it be something to do with the timing of the filter and the subreport that isn't a case when you change the record source ??
A Report has an option to be emailed by DoCmd.SendObject which means we can not use the normal Where clause to filter the data.
I got around this by using TempVars and checking for same in the Report Open Event.
A filter will then be used if so required.
This worked fine for a single report but is throwing error 3097 claiming the field could refer to more then one table.
The Report SQL does not indicate this to be the case.
The report has a sub report - could this be the issue ?
I resolved the issue by changing the record source instead of a filter.
The alternative record source is the same as the original one except for the criteria on one field that refers to the TempVars.
If the filter had a clash, why then doe the sql not throw the same error ?
If the sub report is the issue, again why does the record work ?
Could it be something to do with the timing of the filter and the subreport that isn't a case when you change the record source ??
