DCount in a calculation.....

Moxioron

Registered User.
Local time
Today, 15:00
Joined
Jul 11, 2012
Messages
68
Hello all.

In a report I am tryintg to divide the CountOfAccount number by by the total number in another query.

Individually in the report I get the totals, but when I try to get the % using the formula below, I get #Type!

=[qry_Reprice - Stay at Same Rate - A+]![CountOfAccount number]/DCount("*","qry_Count and Sum of All Cardholders")

The count for [qry_Reprice - Stay at Same Rate - A+]![CountOfAccount number] = 9,898.

If I use this number in a formula - 9,898/]/DCount("*","qry_Count and Sum of All Cardholders") it works...but since the count changes, I need the reference to work.

Ugh.. Any ideas? Thank you.
 
have you tried the Val() function eg =Val([qry_Reprice - Stay at Same Rate - A+]![CountOfAccount number]) / DCount("*","qry_Count and Sum of All Cardholders")?

Where are you carrying out the calculation? is it the query qry_Reprice - Stay at Same Rate - A+], in another query, on a form or on a report? On the same query you would only need [CountOfAccount number], on another object you would need to dlookup() the value.
 
Thanks for the response. Even with using your suggestion I still get the #Type! message.
 

Users who are viewing this thread

Back
Top Bottom