Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make a call to another query in my current report?

Status
Not open for further replies.

darkhat01

IS-IT--Management
Apr 13, 2006
144
0
0
US
How do I make a call to another query to do a Sum of all the Q1's that equals 1? Currently the Record source for the report is one query qManagers and this gives me 90% of the data that I need and I also need results from another query called qEnterpriseQuery.

Here is what I was thinking, but it is not working?


Code:
=Sum(Abs(qEnterpriseQuery!Q1=1))

Thanks,
Darkhat01
 
You need a Domain Aggregate Function, this may suit:

[tt]=DSum(Abs("Q1","qEnterpriseQuery")[/tt]
 
That helped alot by doing a DCount for everything, but what would I do if I only wanted to count it if Q1 equals 1?

Works if I want to count everything.
=DCount("Manager","qEnterpriseQuery")


I tried =DSum(Abs("Q1","qEnterpriseQuery")) and I Get a error that tells me "The expression you entered has a function containing the wrong number of arguments."

Thanks,

Darkhat
 
You can use a Where argument:

[tt]=DCount("Manager","qEnterpriseQuery","Q1=1")[/tt]
 
I also tried somethign like this and it did not work:
=DSum(Abs("Q1","qEnterpriseQuery","Q1"=1))
 
It wouldn't. Here is an example:

=DSum("Abs(Q1)","qEnterpriseQuery","Abs(Q1=1)"))

Are you saying that you want to sum where Q1=1 or Q1=-1?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top