Format text field as number???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text field that has numbers if applicable and text (N/D) if not. If
there are numbers they could range from 100 to 10,000. If the number is
1,000 or greater, I want to add the comma....but no comma if it is just a
3-digit number or text.

I got it to ALWAYS put a comma, but I can't figure out how to only put one
for a 4 or 5 digit number and nothing else. Can someone please tell me how
to accomplish this?

Thanks!
Susan
 
In the underlying query, you could use

IIF(Len(SomeField & "" )<4, SomeField,Format(Val(SomeField),"#,000"))

You can use similar logic in VBA code in the report section.

Also, you might be able to use conditional formatting to do this.
 

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

Back
Top