M
ME
I have unbound text boxes on a form for entry of time in
HH:MM:SS format. Someone is the newsgroup helped me with
the code to convert/save the time as HH only and on the
Form_Current event I have the following code to display
the data back:
If Not IsNull(Me![RunTime]) Then
Me!Text96 = Me![RunTime] * 3600
Me!txtHr = Me![Text96] / 3600
Me!txtMin = Me![Text96] / 60 Mod 60
Me!txtSec = Me![Text96] Mod 60
End If
But I don't want the txtHr to display any decimal places
ie;1.67 in RunTime should display 1:40:00 but it's
obviously displaying 1.67:40:00 because of my code. I have
the decimal properties set to 0 and if I shrink the box it
will round off the number which I also don't want. Any
ideas? Thanks for the help.
HH:MM:SS format. Someone is the newsgroup helped me with
the code to convert/save the time as HH only and on the
Form_Current event I have the following code to display
the data back:
If Not IsNull(Me![RunTime]) Then
Me!Text96 = Me![RunTime] * 3600
Me!txtHr = Me![Text96] / 3600
Me!txtMin = Me![Text96] / 60 Mod 60
Me!txtSec = Me![Text96] Mod 60
End If
But I don't want the txtHr to display any decimal places
ie;1.67 in RunTime should display 1:40:00 but it's
obviously displaying 1.67:40:00 because of my code. I have
the decimal properties set to 0 and if I shrink the box it
will round off the number which I also don't want. Any
ideas? Thanks for the help.