Zeros after decimal

J

jimphilly

I have a value in a field that has a data type as "single" number and is
formatted as general number with an input mask of 0.00. I also have a form
using that field. The text box (TB1) has the same formatting and the same
input mask

My problem is this. When data put into the field, if it has trailing zeros,
the zero aren't showing up. I have another textbox (TB2) in the form that
uses that data to concatenate a score (using that data with data from TB3).
The scoring field uses [TB2] = (Left([TB1], 1)) & (Right([TB1], 2)) & "." &
Right("0000" & [TB3], 4)
The code is reading TB1 as X rather than X.XX (if there are trailing zeros).
So the result is XX.XXXX rather than XXX.XXXX.

How do I get the code to read the trailing zeros?
 
J

Jeff Boyce

There's a difference between how data is stored (with or without an input
mask), and how it can be displayed.

If you have zeros to the right of "significant digits", they are
meaningless. If you want to see zeros to the right of your "significant
digits", you will need to use the format property or the Format() function.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Top