Validating Combo Boxes
Posted on 2005-04-17
Hi any help would be much appreciated as this problem has got me stuck, although I am sure the answer may well be very simple.
I am writing an application, that has open and closing times of a retail outlet. As the times may vary widly I have opted for 4 combo boxes
OpenMinute 00-55 (in five minute intervals)
Close hour 00-24
CloseMinute 00-55 (in five minute intervals)
All I want to do is validate that the closing time (hour and minutes combined) is greater than the opening times (again hour and minutes). I have set up a handler on each combo box to validate the opening time is still less than the closing time each time a value has been changed.
If the result of the check is "false" i.e. the closing time is less than the opening time, can I reset the last changed value back to it's previous value, after displaying an error message.
Thanks for any help