Setting decimal places in text form field.

G

Guest

I have a template that is using bookmarks and import data from access into
different text form fields. One of the form fields contains a number and I
can not get it to only have only two decimal places. In the properties for
the text form field I have set the Type to number, Maximum length to (4) and
I have tried a few different things for Number Format including “0.00â€
..“0.##â€. I would like to have only two decimal places showing. Thank you for
the help.
TC
 
C

CyberTaz

I'm not really sure since you don't give detailed specifics about the
incoming values & their consistency - you may be expecting too much of a
FORMTEXT field - but try changing the Max Length to 5 & using ##.## as the
number format. I believe this will accept only the first 5 characters
entered (including the ".") but all entries will result in xx.xx, which is
fine if you aren't looking for accurate rounding & all your values are such
as:

12.345 ---> 12.34
45.2 ---> 45.2
34.9999999 ---> 34.99

Keep in mind that the Type: specification of Number simply restricts any
characters other than the digits 0-9 from being entered into the field and
that the Format property only determines how the content displays. The field
isn't "converted" to the equivalent of a spreadsheet cell that deals with
*values*, it's still a *text* box.
 

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