Hi.
I have a select query based on a crosstab query.
All the fields are number (currency) fields. I needed to check for NULL values and used the following to great success:
OakvilleUNUMMS: NZ([qryYTDBusLSMS].[qryYTDBusMS_CrssTb.UNUM],0)
Thus, if the value of "OakvilleUNUMMS" is 13000, then the "NZ" function returns either 13000 OR 0 (If Null).
The problem is that you lose the ability to set the "Format" and "Decimal Places" in "properties".
I used the "Format" command like the following:
FORMAT(NZ([qryYTDBusLSMS].[qryYTDBusMS_CrssTb.UNUM],0),"Currency"
This returned the value as $13000.00.
This all works in my report, but when I try to add two of these values together, (for example, $100.00 + $200.00), I expect to get $300.00 as the result. Instead I'm getting,
$100.00$200.00 as the result.
I set the "Format" value in the textbox in the report to "Currency" and the "DecimalPlaces" value to "2" and "Auto" with no result.
Can anyone tell me how I can add these two numbers together correctly or what's wrong?
Many TIA
K
I have a select query based on a crosstab query.
All the fields are number (currency) fields. I needed to check for NULL values and used the following to great success:
OakvilleUNUMMS: NZ([qryYTDBusLSMS].[qryYTDBusMS_CrssTb.UNUM],0)
Thus, if the value of "OakvilleUNUMMS" is 13000, then the "NZ" function returns either 13000 OR 0 (If Null).
The problem is that you lose the ability to set the "Format" and "Decimal Places" in "properties".
I used the "Format" command like the following:
FORMAT(NZ([qryYTDBusLSMS].[qryYTDBusMS_CrssTb.UNUM],0),"Currency"
This returned the value as $13000.00.
This all works in my report, but when I try to add two of these values together, (for example, $100.00 + $200.00), I expect to get $300.00 as the result. Instead I'm getting,
$100.00$200.00 as the result.
I set the "Format" value in the textbox in the report to "Currency" and the "DecimalPlaces" value to "2" and "Auto" with no result.
Can anyone tell me how I can add these two numbers together correctly or what's wrong?
Many TIA
K