View Full Version : How to get single number result from Totals query to appear in text box on report


RBecraft
10-14-2002, 01:54 PM
Access 97:

I have a Totals query that results in one number (using the Count function). I have a text box control on a report. I have set the Control Source property to =[Totals query name]![query field name] but get #Name as an error (the names of the text box control, report and query are all very different and do not conflict).

Am I going about this in the wrong way?

Thanks,

Richard

llkhoutx
10-14-2002, 02:13 PM
Instead of usi9ng a text box, use a subreport.

RBecraft
10-14-2002, 02:40 PM
Thank you very much.

Since I have 16 Totals queries (each one of them with special criteria filters), I was wondering if there was a solution other than adding 16 subreports (each based the one of the 16 individual queries) to the report. Know I know there isn't.

Thank you for responding. I don't do this very much and I feel on shakey ground whenever things start getting complex.

VR,
Richard

Rich
10-14-2002, 02:57 PM
You could use DLookup on each, be careful though an error on one will show all as #error

RBecraft
10-14-2002, 03:35 PM
Thank you Rich,

I do not know how to use multiple search criteria in the DLookup but I will research it.

Thanks again,

Richard