Leonard
March 10th, 1999, 03:43 PM
I have the situation where on checking a checkbox focus is sent to a textbox and if the value of the textbox is not greater than zero ie if uninitialized or zero or empty then the user may not proceed until a valid value is placed in the textbox. Can anyone help!
Chris Eastwood
March 10th, 1999, 05:18 PM
Hi
This isn't exactly standard windows behavior and would involve some 'slimy hacks' to get it working the way you want.
Wouldn't it be better to disable the other controls until a value is entered into the Text Box (you could check the value in the _KeyUp event,
eg.
If Len(Text1.Text) = 0 Then ... nothings in the textbox
or
Dim lVal As Long
On Error Resume Next
lVal = CLng(Text1.Text)
If lVal = 0 Then ..... error
etc).
Regards
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb