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
SteveL13Asked:
Who is Participating?
 
Dale FyeConnect With a Mentor Commented:
Try forcing it to a numeric format:

=CLNG(NZ([QtyAvail], 0))

0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
How about

=Format(Nz([QtyAvail],0),"0,000")

mx
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
This is probably better:

=IIF(IsNull([QtyAvail]), Null, Format([QtyAvail],"0,000") )

mx
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
HainKurtSr. System AnalystCommented:
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)
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
But ...

Format(0,"0,000")
Returns 0,000

fyed's solution is probably the best.

mx
0
 
Dale FyeCommented:
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().
0
 
HainKurtSr. System AnalystCommented:
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Yeah, I guess that was obvious, lol ...

mx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.