Thanks for the assist. Here is the SQL:
SELECT t_Heat_Treat_Oven_Log.Date
FROM t_Heat_Treat_Oven_Log
GROUP BY t_Heat_Treat_Oven_Log.Date
HAVING (((t_Heat_Treat_Oven_Log.Date) Between
DLookUp("[Date]","t_Heat_Treat_Oven_Log","[PC]='THERM'") And Date()));
I am currently doing this in a sub-query. I have another that I am using to
get the count. The both querys are 'Select Queries'. My sub merely has my
Date field with the above in the criteria.
I hope this is what you were asking for.
Thanks
David
Daryl S said:
David -
If you posted your SQL, that would help. A couple things you can try in
your original query. First, in the totals row for the field with the
criteria, make that a WHERE. Then instead of the "*" to do the count on,
just select the key field from the table. That count should work in a single
query. If not, post your SQL (from SQL View), and tell us what the query
returns so we can help more.
--
Daryl S
:
I am looking for a count of items meeting certain criteria. I am using this
< Between DLookUp("[Date]","t_Heat_Treat_Oven_Log","[PC]='THERM'") And Date()
to retrieve the data, but have been unable to get a count. I had to put
the above in a sub query, and create one just for the count. Is there a way
to do this in one query?
Thanks
David