E
eddiec
hi everyone,
I have a report in an adp that uses aggregate functions in its record source
and I am trying to figure out how to filter the records displayed in the
report:
DoCmd.OpenReport with a SQL string for the where condition does not work.
The error returned is:
The column prefix dbo.mytable does not match with a table name or alias used
in the query
If I fire up SQL Query Analyzer and pop in the query with the where clause
at the end it returns the correct result set. Maybe the reason that this
does not work in Access is becasue DoCmd.OpenReport adds the where clause on
to the end of the query instead of putting it before the 'Group By'.
As I see it I have two options:
1) Simply program the entire report using VBA and not use the Access
reporting facility.
2) Retreive all the records from the database and then aggregate the
variables within the report. This is messy because you would generate a
large amount of network traffic (the source table has approx 5,000,000
records)
Help!
TIA
eddiec
I have a report in an adp that uses aggregate functions in its record source
and I am trying to figure out how to filter the records displayed in the
report:
DoCmd.OpenReport with a SQL string for the where condition does not work.
The error returned is:
The column prefix dbo.mytable does not match with a table name or alias used
in the query
If I fire up SQL Query Analyzer and pop in the query with the where clause
at the end it returns the correct result set. Maybe the reason that this
does not work in Access is becasue DoCmd.OpenReport adds the where clause on
to the end of the query instead of putting it before the 'Group By'.
As I see it I have two options:
1) Simply program the entire report using VBA and not use the Access
reporting facility.
2) Retreive all the records from the database and then aggregate the
variables within the report. This is messy because you would generate a
large amount of network traffic (the source table has approx 5,000,000
records)
Help!
TIA
eddiec