Time entry

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to enter a time processing mesure to a database.

The basic measure is minutes, but would like to have the user enter an hh:mm
value.
I currently have a form with an unbound textbox formatted as short time
feeding values to a numeric/integer field mdb database.

The basic input code is:

Private Sub Time_Input_AfterUpdate()
Time_work.Value = Minute(Time_Input.Value) + 60 * Hour(Time_Input.Value)
End Sub

My problem is with the display of the data back to that textbox on
subsequent displays.

As far as I've got it:

Private Sub Form_Load()
checkRMAStatus
checkWarranty
Time_input.Value = 2.5 * Time_work / 3600
End Sub

1st quesion
I've plugged in the numbers in the above to match quantities entered between
input and display. I can understand the 3600 somehow, but not the 2.5. I
don't understand the coding for time: day for integer part starting from
1900, hour for next two decimals, minute for decimals 3 to 5 and so on, does
not fit.
?

2nd question
I've basically tried a shortcut for data entry through an unbound texbox.
I'm just not all that keen any more on parsing strings on . or :.
The trick basically works on entry (a helptag has pacified users).
But on entry to the textbox, I cannot suppress the second and am/pm portion
of a short time format entry. Short time format having worked up to that
point.
?
Of course, tia.
 
Back
Top