Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decimal places in text box

Status
Not open for further replies.

Boccle

Technical User
Feb 19, 2003
14
0
0
GB
Hi,

I'm having a bit of a problem with displaying only two decimal places in a text box on one of my forms. This should be quite simple, but it just doesn't seem to want to work!

The text box takes its value from a field in a query. I would like the text box to display its numeric value to 2 decimal places, so I set its format to standard. However, this appears to have no effect.

It doesn't seem to do it now (I've been fiddling with this for some time) but at one point if I set the number of decimal places to 2 in design view and then switched to form view, the value in the text box would be displayed to 2 decimal places. However, when the text box lost focus, all decimal places were displayed again. Also, whilst this was the case, when the form was opened by clicking a command button on another form, the text box would display all its decimal places....it was only by changing from design view to form view that only 2 decimal places would show.

I'm quite confused by this one!!!

I have also noticed something strange: when the text box control source is set to the query field, the drop down list for the format property is empty, if i delete the query field from the control source property then all of the possible options for the format property return????? Anyone know why it's doing this?

TIA
 
Set the format field to "Fixed" then the number of decimal places to 2.

When your cursor is within the text box, it will display all decimal places then in case you want to modify the value with greater precision.
 
Ummm...afraid that doesn't seem to work.

Don't suppose you have any opther ideas????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top