troubleshooting Question

Formatting decimals and whole numbers

Avatar of thandel
thandel asked on
Microsoft Access
6 Comments1 Solution271 ViewsLast Modified:
I have a text box on a form that displays some calculation based on the form.  All is working well but sometimes I have to display a decimal and other times a whole number.  This number represents month(s) so if the value is whole I don't want to display a decimal and when its not whole I want to display to one tenth of the value.

i.e. 12 months vs. 0.5 months.

I'm using Format (MyVariable, "0.0") which works OK but then the decimal is always displayed.

Any ideas?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros