Report
(1)
DSum
(1)
DMax
(1)
Days
(1)
Aggregates
(1)
Measures
(1)
Rejects
(1)
SLA
(1)

Select Distinct subquery in a Report Control?

Asked By Jim K
20-Nov-09 04:41 PM
I have written a report  that aggregates (avg, sum, count) a 10 or 15 measures
($, Days to Book, # rejects, %within SLA, etc.)  I need to do a COUNT
DISTINCT on one control (D&B number) to determine how many distinct companies
I am dealing with in a particular country or region.

I have written a SQL subquery that does what I want it to do, but I cannot
figure out how to imbed that statement into a control expression in a Report.
I prefer to work with the report engine because I need to take a number of
cuts on different groups and levels of detail and just find it easier to do
using Reports.  it is working great except for this one control.  Any thoughts?

Thanks, Jim

You cannot use a SQL statement or query name in the control source of a

Duane Hookom replied to Jim K
22-Nov-09 03:04 PM
You cannot use a SQL statement or query name in the control source of a text
box. You might be able to use a domain aggregate function such as DLookup()
or DMax() or DSum().

It would help if we knew more about your tables and/or query.

--
Duane Hookom
Microsoft Access MVP
Post Question To EggHeadCafe