View Single Post
  #2  
Old January 8th, 2010, 01:23 AM posted to microsoft.public.access.reports
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Variable/Adaptive Numeric Format

How do you propose to explain to Access how to tell that a number "has no
significant decimals"? Unless you can explain it to Access, Access won't be
able to handle that.

I'm having trouble imagining a simple process that would handle integers,
real numbers, and fractional decimals. I suspect it can be done, but you'd
probably need to test each value to find out which of the above it was,
before handling appropriately.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"JASelep" wrote in message
...
in Access 2007
I some report fields that are to display quantities and amounts
the range of these numbers could be large (100,000 or $345,999) or small
(0.375 or $0.0625)
is there a way to have the field formatted to adapt to the range of the
value being displayed
for example if the value has no significant decimals then display the
value
without decimal places (512.00 becomes 512) or if the value has many
decimals
limit the display to only 2 decimals (0.63712938 becomes 0.64)


--
Jim