DCount Domain Aggregate Function

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I have a query that performs DCount functions. 90 of them
to be exact, all with expressions similiar to these.

Expr6: DCount("[NUMBER]","qryWeekCalc2","[Priority]='B'
AND [Status]='Closed' ")
Expr25: DCount("[NUMBER]","qryWeekCalc2","[Priority]='C'
AND [DATE ISSUED] < (Date()-13) ")

Currently I have the query limited to records by a
combobox in a form. I have field 'System' in the query.
The criteria for 'System' is selected in a combobox on the
form that runs the query. So the user selects the system
and clicks the command button to run the query. The
results are displayed in a new form. I can run the query
for all systems by removing the combobox based criteria.
Basically I can calculate for 1 system or all systems. My
question is this. How can I display calculations for each
individual system. Basically i want to run the same
calculations for each system and display the results all
at once. The image in my mind is that each system will be
a record in the form. I've tried some various forms of
grouping by the system in the SQL but have so far been
unsucessful.
Thanks,
Mike
 
Mike,

I don't understand. As far as I can follow your description, I would
imagine you already have what you are asking for. No? If you select
a system in the combobox criteria, you get a one-row output, for the
selected system. Yes? If you do not select a system, your query
returns multiple rows, one for each system. Yes? No? If no, I guess
it means you haven't included the System field in the query output?

By the way, have you looked into CrossTab queries, or Pivot Tables?
These might offer an alternative means of achieving your purpose.

- Steve Schapel, Microsoft Access MVP
 
Back
Top