SteveL13
asked on
Field on report won't display commas
I have a number field on a report set as standard, 0 decimals. But it will not display the commas.
Here is the control source. How can I change it to display commas (like for example... 5,250)
=Nz([QtyAvail],0)
--Steve
Here is the control source. How can I change it to display commas (like for example... 5,250)
=Nz([QtyAvail],0)
--Steve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
no need to use NZ or IsNull
= format([QtyAvail], "0,000")
should be ok, if it is null, then format returns null (or empty string)
= format([QtyAvail], "0,000")
should be ok, if it is null, then format returns null (or empty string)
But ...
Format(0,"0,000")
Returns 0,000
fyed's solution is probably the best.
mx
Format(0,"0,000")
Returns 0,000
fyed's solution is probably the best.
mx
I've found that Access frequently fails to correctly interpret the desired datatype returned by the NZ() function, so I normally do this type of explicit typing whenever I use NZ().
Yeah, I guess that was obvious, lol ...
mx
mx
=IIF(IsNull([QtyAvail]), Null, Format([QtyAvail],"0,000")
mx