Form will not show decimals

Randy U

Registered User.
Local time
Today, 06:00
Joined
Nov 17, 2004
Messages
10
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
 
CalculateIt = Int(

Int returns a whole number, scrap it

Me!Text77 = "0.000001"
adding quotes to a number will change it to a string, remove them too.

Change the data type in the table to Double or Single
 
Thanks Rich
 

Users who are viewing this thread

Back
Top Bottom