QUery is returning text when it should be $$$

daievans

Registered User.
Local time
Yesterday, 23:09
Joined
Apr 3, 2013
Messages
75
I run a MakeTable Query on some data to COunt the number of records and Sum the Value of $$$ in a Currency field.

The results produce a Number for the Count, but the SUM of the Balances is returned as text. To get the SUM I use the expression
SumBal: DSum("[Balance]","[XAM_data]")

Anyone know why it won't return the SumBal in Currency format?

:confused:
 
formats are formats, Dsum adds numbers, it won't preserve formats

if you just want the currency format then format your form or report control as currency.

Alternatively wrap your dsum in CCur - CCur(Dsum("[Balance]","[XAM_data]"))

which will convert the value to a currency datatype
 
Thanks CJ - you're a star!
Fixed it good and proper you did.

:D
 

Users who are viewing this thread

Back
Top Bottom