C
Chris
I may not have said that correctly. Here goes...
User inputs time into a field by entering or using KeyPress event to
increase/decrease time in 15 minute increments.
******* code for keypress event
Dim strInterval As String
strInterval = "n"
Select Case KeyAscii
Case 43 'plus key
KeyAscii = 0
Screen.ActiveControl = DateAdd(strInterval, 15, Screen.ActiveControl)
Case 45 'minus key
KeyAscii = 0
Screen.ActiveControl = DateAdd(strInterval, -15, Screen.ActiveControl)
End Select
******* end code
My conrtrol [txtDC7Start] is formatted "h:nn a/p" and defaults to "8:00 a".
Its control source is [DC7Start]. Presently, the user can +/- or enter the
time. I want to restrict their input to between 6 am and 10 pm. I am having
trouble with the time format combined with limitation.
Can someone suggest a simple method to accomplish this limitation? The
User inputs time into a field by entering or using KeyPress event to
increase/decrease time in 15 minute increments.
******* code for keypress event
Dim strInterval As String
strInterval = "n"
Select Case KeyAscii
Case 43 'plus key
KeyAscii = 0
Screen.ActiveControl = DateAdd(strInterval, 15, Screen.ActiveControl)
Case 45 'minus key
KeyAscii = 0
Screen.ActiveControl = DateAdd(strInterval, -15, Screen.ActiveControl)
End Select
******* end code
My conrtrol [txtDC7Start] is formatted "h:nn a/p" and defaults to "8:00 a".
Its control source is [DC7Start]. Presently, the user can +/- or enter the
time. I want to restrict their input to between 6 am and 10 pm. I am having
trouble with the time format combined with limitation.
Can someone suggest a simple method to accomplish this limitation? The