Form will not display decimal Places

D

dbl

Hi I have a db that records holidays the table will let me enter part days
i.e 1.5, but in the forms I can enter decimal places but it rounds it back
to whole numbers.
The numbers entered in the tables i.e. 1.5 displays as 1 in the form.

What am I doing wrong?

Thanks Bob
 
T

Tom Lake

dbl said:
Hi I have a db that records holidays the table will let me enter part days i.e 1.5,
but in the forms I can enter decimal places but it rounds it back to whole numbers.
The numbers entered in the tables i.e. 1.5 displays as 1 in the form.

What am I doing wrong?

Thanks Bob

Did you set the format of the text box on the form to display decimal places?

Tom Lake
 
D

Douglas J. Steele

Does the field in the table to which the text box is bound allow decimal
places?

The default datatype when you set a field to Numeric is Long Integer, which
can't accept decimal points. You'd need to change the data type to Single or
Double.
 
D

dbl

Douglas the tables are set to Double and decimal places 2
the fields are set to General number and decimal places 2
but I still only get whole numbers, unless I enter the data straight into
the table then it displays decimal places.

I must still be doing something wrong any idea's?

Thanks Bob
 
D

Douglas J. Steele

You sure your text box is bound to the correct field? Is there any
formatting on the text box itself?
 
B

Bob Hairgrove

Douglas the tables are set to Double and decimal places 2
the fields are set to General number and decimal places 2
but I still only get whole numbers, unless I enter the data straight into
the table then it displays decimal places.

I must still be doing something wrong any idea's?

Maybe it is locale-related. What is the system locale of the client's
computer? Different countries have different decimal separators --
Germany, for example, uses a comma instead of a period (full stop).
 
D

dbl

Hi the properties settings for the text box are as follows

Name TextBox Duration
Control CountOfSurname
Format General Number
Decimal Places 2

Bob
 
D

Douglas J. Steele

Hold on. CountOfSurname sounds suspiciously like the result of using the
Count() function in a query. A count field is not going to have decimals.
 

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