Time

T

Tommy2326

Is there anyway to set the time so it will come up as '6am-7am' when you
press a start time button? There is 4 boxes that will gather data over 12
hours. The form looks very crowded just now as I have set it up with 48
boxes to gather the data.

Thanks for the help

Tommy
 
T

Tommy2326

Come up as 6am-7am in a text box. The reason for this would be to show the
time period the data is being gathered for. It doesnt necessarily have to be
6am-7am, could be in 24 hour clock format 17-18. If it is possible to do
this I feel it would be better, rather than having 12 text boxes with the
time period, and then for every time period another 4 text boxes for the data
to be gathered.
 
U

UpRider

This will work in real time.

Private Sub cmdStart_Click()
Select Case Hour(Time)
Case 24, 1
txtStart = "12AM-1AM"
Case 2, 3
txtStart = "2AM-3AM"
'etc
Case 11, 12
txtStart = "11AM-12PM"
Case 13, 14
txtStart = "1PM-2PM"
'etc
Case 23, 24
txtStart = "11PM-12AM"
End Select
End Sub

UpRider
 
T

Tommy2326

Thanks, I've got that working now.

UpRider said:
This will work in real time.

Private Sub cmdStart_Click()
Select Case Hour(Time)
Case 24, 1
txtStart = "12AM-1AM"
Case 2, 3
txtStart = "2AM-3AM"
'etc
Case 11, 12
txtStart = "11AM-12PM"
Case 13, 14
txtStart = "1PM-2PM"
'etc
Case 23, 24
txtStart = "11PM-12AM"
End Select
End Sub

UpRider
 
Top