|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have a table that I can directly input a value such as 0.997854 but when I create a form the value will only display "0" and thats also what gets populated into the table. The values must be exact down to say 5 places after the decimal. Am I using the wrong data type?
This is the code I am using on the form. Help me with what I am doing wrong: Private Sub Temperature_LostFocus() Dim CalculateIt CalculateIt = Int(1.003353 - (0.00026 * Me!Temperature)) If Me!Temperature = "" Then Me!Text77 = "0.000001" Else Me!Text77 = CalculateIt End If End Sub |
|
#2
|
|||
|
|||
|
If its in your design table set the numeric as decimal in the field size and for decimal places set to as many as you want. On the form go to the properties of the text box and set the decimal places in there also.
Hope this helps Nikki Mc |
|
#3
|
|||
|
|||
|
Randy,
Set data type to double. lwells |
|
#4
|
|||
|
|||
|
Actually neither of those answers worked. I did find a real solution. I had to drop the "Int" from the code and also drop the quotes from another part. After I did that it all worked well.
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > I cant get a form to display decimals |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|