Query Field Format

G

Grimwadec

I have a field in a query "PriceDefault" which displays e.g. "$50.00".
However when I use Nz in another field "Nz([PriceDefault],0)" the currency
format does not display, e.g. "50". The query field Property Sheet offers
"Format" as one of its properties with no dropdown options and recording
"Currency" has no effect. Help please
 
D

Duane Hookom

Try wrap the expression in Val() which will convert the string value to a
number.
Val(Nz([PriceDefault],0))
 
M

MGFoster

Grimwadec said:
I have a field in a query "PriceDefault" which displays e.g. "$50.00".
However when I use Nz in another field "Nz([PriceDefault],0)" the currency
format does not display, e.g. "50". The query field Property Sheet offers
"Format" as one of its properties with no dropdown options and recording
"Currency" has no effect. Help please


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It seems Nz() turns the numeric values into strings. You'll have to use
the CCur() function around the Nz(...) function:

CCur(Nz(PriceDefault,0))

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSoy6KoechKqOuFEgEQLzqACfcxOhexQOjiP6bTWXghVg6My0J/UAoMjp
VSCzVJK8eV5fzM2+BjqMsw6J
=X/Yd
-----END PGP SIGNATURE-----
 

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