I am using a DTPICKER for time entry, without seconds. Is there a way to limit the minutes to 15 minute intervals?
Please help.
Printable View
I am using a DTPICKER for time entry, without seconds. Is there a way to limit the minutes to 15 minute intervals?
Please help.
Can someone tell me if this can be done? I am trying to use the minute and hour properties, but must be screwing it up :
In the click???
DTPICKER1.MINUTE=DTPICKER1.MINUTE+15
IF DTPICKER1.MINUTE=45 then
DTPICKER1.HOUR=DTPICKER1.HOUR+1
END IF
Any ideas?
You could try placing this in the change object (Sub DTPICKER1_change):
dim nQuarters as int
nquarters=0
nQuarters = dtpicker1.minute \ 15
if dtpicker1.minute=0 or dtpicker1.minute=15 or dtpicker1.minute=30 or dtpicker1.minute=45 then exit sub
if dtpicker1.minute>44 then
dtpicker1.minute=0
dtpicker1.hour= dtpicker1.hour + 1
else
dtpicker1.minute= 15 * (nQuarters + 1)
end if
Exactly what I was looking for.