qrys and controlsource

  • Thread starter Thread starter John
  • Start date Start date
J

John

I am putting together a report of statistics from within
the database. On the report (unbound) there are various
textboxes to display the info. I am putting together
different queries bringing together multiple tables to
gather the stats. The number of fields may vary but only
one of the qry fields will have the response needed. The
stats mainly center around counting the number of
(something) or the sum of (something). What I am having
problems with is how do I place the qry into the txtbox
controlsource? I seems I get either the Name or Error in
the field.
I say thanks for any assistance.
*** John
 
John said:
I am putting together a report of statistics from within
the database. On the report (unbound) there are various
textboxes to display the info. I am putting together
different queries bringing together multiple tables to
gather the stats. The number of fields may vary but only
one of the qry fields will have the response needed. The
stats mainly center around counting the number of
(something) or the sum of (something). What I am having
problems with is how do I place the qry into the txtbox
controlsource?


You can not use a query in a control source expression.
However you can use the Domain Aggregate functions (DCount,
DSum, etc), which will retrieve a value from a table or
saved query .
 
Back
Top