Any way I can get this SQL to work like =DCount as the control source for a text box?
where coun000030 is CountSheetCode extracted from the form as in the DCount below.
...or should I just save it as a query and dcount it? Something like:
I've heard dcount can be slow - could this be a problem for 50000-200000 records?
I need this value to be shown on a Continuous Forms, which is a subform filtered by CountSheetCode.
Thanks,
Phil
---------------
Pass me the ether.
Code:
select count(*) as countofdistinct from (SELECT DISTINCT TFossil.CODE, TSample.CountsheetCODE
FROM TSample INNER JOIN TFossil ON TSample.SampleCODE = TFossil.SampleCODE
GROUP BY TFossil.CODE, TSample.CountsheetCODE
HAVING (((TSample.CountsheetCODE)="coun000030")));
where coun000030 is CountSheetCode extracted from the form as in the DCount below.
...or should I just save it as a query and dcount it? Something like:
Code:
=DCount("*","QSelectTDistinctFossilsWithCountsheetCode","[CountsheetCODE]= '" & [BoxCountsheetCODE] & "'")
I've heard dcount can be slow - could this be a problem for 50000-200000 records?
I need this value to be shown on a Continuous Forms, which is a subform filtered by CountSheetCode.
Thanks,
Phil
---------------
Pass me the ether.