|
-
March 10th, 1999, 04:43 PM
#1
Textbox values
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!
-
March 10th, 1999, 06:18 PM
#2
Re: Textbox values
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|