how to get query result into textbox on report..

N

nycdon

i'm setting up a report, and trying to get query output (count), into a text
box on report..

control source of the text box i set to:

=[CountBuildwActiveContacts]![CountOfBuildingID]

but..when i run, brings up a parameter box to enter the above fields..
(these are valid names, as took right from object viewer in 'build' box..

thanks!
don
 
P

Pat Hartman

Report/Form controls can be bound to a column in the Report/Form's
RecordSource or the control's ControlSource may contain a valid expression.
You can look up expression in help to see what a valid expression looks
like. To show the count of a different recordset, you could use the
DCount() function. If the count is for the bound RecordSource, you should
use
=Count(*) as the ControlSource
 
N

nycdon

I tried Dcount using the Query, but still asks for field value..the query is
not the Report's RecordSource.

I basically have a number of complex count queries against different tables,
and want to show them all on one report...Thinking now I could MakeTable with
all the resulting counts, then just use that as RecordSource for report
maybe?

Pat Hartman said:
Report/Form controls can be bound to a column in the Report/Form's
RecordSource or the control's ControlSource may contain a valid expression.
You can look up expression in help to see what a valid expression looks
like. To show the count of a different recordset, you could use the
DCount() function. If the count is for the bound RecordSource, you should
use
=Count(*) as the ControlSource
nycdon said:
i'm setting up a report, and trying to get query output (count), into a text
box on report..

control source of the text box i set to:

=[CountBuildwActiveContacts]![CountOfBuildingID]

but..when i run, brings up a parameter box to enter the above fields..
(these are valid names, as took right from object viewer in 'build' box..

thanks!
don
 
N

nycdon

Thanks Pat..I ironed out the dcount syntax, and works!

nycdon said:
I tried Dcount using the Query, but still asks for field value..the query is
not the Report's RecordSource.

I basically have a number of complex count queries against different tables,
and want to show them all on one report...Thinking now I could MakeTable with
all the resulting counts, then just use that as RecordSource for report
maybe?

Pat Hartman said:
Report/Form controls can be bound to a column in the Report/Form's
RecordSource or the control's ControlSource may contain a valid expression.
You can look up expression in help to see what a valid expression looks
like. To show the count of a different recordset, you could use the
DCount() function. If the count is for the bound RecordSource, you should
use
=Count(*) as the ControlSource
nycdon said:
i'm setting up a report, and trying to get query output (count), into a text
box on report..

control source of the text box i set to:

=[CountBuildwActiveContacts]![CountOfBuildingID]

but..when i run, brings up a parameter box to enter the above fields..
(these are valid names, as took right from object viewer in 'build' box..

thanks!
don
 
B

bassplayer13

Hi, I am having trouble using the DCOUNT Function, can you help me out?

nycdon said:
Thanks Pat..I ironed out the dcount syntax, and works!

nycdon said:
I tried Dcount using the Query, but still asks for field value..the query is
not the Report's RecordSource.

I basically have a number of complex count queries against different tables,
and want to show them all on one report...Thinking now I could MakeTable with
all the resulting counts, then just use that as RecordSource for report
maybe?

Pat Hartman said:
Report/Form controls can be bound to a column in the Report/Form's
RecordSource or the control's ControlSource may contain a valid expression.
You can look up expression in help to see what a valid expression looks
like. To show the count of a different recordset, you could use the
DCount() function. If the count is for the bound RecordSource, you should
use
=Count(*) as the ControlSource
i'm setting up a report, and trying to get query output (count), into a
text
box on report..

control source of the text box i set to:

=[CountBuildwActiveContacts]![CountOfBuildingID]

but..when i run, brings up a parameter box to enter the above fields..
(these are valid names, as took right from object viewer in 'build' box..

thanks!
don
 
N

nycdon

i can try..whats your problem?

bassplayer13 said:
Hi, I am having trouble using the DCOUNT Function, can you help me out?

nycdon said:
Thanks Pat..I ironed out the dcount syntax, and works!

nycdon said:
I tried Dcount using the Query, but still asks for field value..the query is
not the Report's RecordSource.

I basically have a number of complex count queries against different tables,
and want to show them all on one report...Thinking now I could MakeTable with
all the resulting counts, then just use that as RecordSource for report
maybe?

:

Report/Form controls can be bound to a column in the Report/Form's
RecordSource or the control's ControlSource may contain a valid expression.
You can look up expression in help to see what a valid expression looks
like. To show the count of a different recordset, you could use the
DCount() function. If the count is for the bound RecordSource, you should
use
=Count(*) as the ControlSource
i'm setting up a report, and trying to get query output (count), into a
text
box on report..

control source of the text box i set to:

=[CountBuildwActiveContacts]![CountOfBuildingID]

but..when i run, brings up a parameter box to enter the above fields..
(these are valid names, as took right from object viewer in 'build' box..

thanks!
don
 
B

bassplayer13

Don, thanks a lot, I actually got it to work. my problem was referencing an
invalid table for my "domain". Thanks for replying.

-Mike

nycdon said:
i can try..whats your problem?

bassplayer13 said:
Hi, I am having trouble using the DCOUNT Function, can you help me out?

nycdon said:
Thanks Pat..I ironed out the dcount syntax, and works!

:

I tried Dcount using the Query, but still asks for field value..the query is
not the Report's RecordSource.

I basically have a number of complex count queries against different tables,
and want to show them all on one report...Thinking now I could MakeTable with
all the resulting counts, then just use that as RecordSource for report
maybe?

:

Report/Form controls can be bound to a column in the Report/Form's
RecordSource or the control's ControlSource may contain a valid expression.
You can look up expression in help to see what a valid expression looks
like. To show the count of a different recordset, you could use the
DCount() function. If the count is for the bound RecordSource, you should
use
=Count(*) as the ControlSource
i'm setting up a report, and trying to get query output (count), into a
text
box on report..

control source of the text box i set to:

=[CountBuildwActiveContacts]![CountOfBuildingID]

but..when i run, brings up a parameter box to enter the above fields..
(these are valid names, as took right from object viewer in 'build' box..

thanks!
don
 
Top