correct formulation of expression in control source

L

LP

How can I combine 2 expressions that use the DCount function?
For example, in control source,
=DCount("[Field1]","qryX","[Field1]=True") will give me a value Y which I
need to add to another value obtained by
=DCount("[Field1]",qryZ","[Field1]=True").
I have tried various bits such as =DCount("[Field1]","qryX" And
"qryZ","[Field1]=True") but that does not work.
Can anyone help?
Regards
 
J

John Spencer

Have you tried

=DCount("[Field1]","qryX","[Field1]=True") +
DCount("[Field1]",qryZ","[Field1]=True").


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
L

LP

Many thanks for this John
Regards
LP

John Spencer said:
Have you tried

=DCount("[Field1]","qryX","[Field1]=True") +
DCount("[Field1]",qryZ","[Field1]=True").


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

LP said:
How can I combine 2 expressions that use the DCount function?
For example, in control source,
=DCount("[Field1]","qryX","[Field1]=True") will give me a value Y which I
need to add to another value obtained by
=DCount("[Field1]",qryZ","[Field1]=True").
I have tried various bits such as =DCount("[Field1]","qryX" And
"qryZ","[Field1]=True") but that does not work.
Can anyone help?
Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top