|
-
Sep 20th, 2001, 01:43 AM
#1
Thread Starter
Member
Multiple Validations in VB 6.0
I'd like to validate input data from option boxes and textboxes. For instance, 3 options and 2 textboxes:
If optOne.value = False And optTwo.value = False And optThree.value = False And txtOne.text = "" And txtTwo.text = "" then
msgbox "enter something"
end if
1. What do I have to do to make the above statement work out? Separate by the types of controls?
2. How do I setfocus to the textbox that doesn't contain anything?
If txtOne.text = "" then
msgbox "enter something in textbox 1"
txtOne.setfocus
end if
if txtTwo.text = "" then
msgbox "enter something in textbox 2"
txtTwo.setfocus
end if
Do I have to do individual if statements for each? There must be a simple way to say that if selections were left blank then bounce to the text box that needs input.
Newbie here so nothing too advanced please. Super appreciate it!
Thanks...............I just love this country.
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
|