|
-
Oct 5th, 2000, 04:52 AM
#1
SSTab & Causes Validation
Using VB6
The SSTab control has a CausesValidation property
that doesn't seem to work.
I have some textboxes with various validation rules,
but these don't seem to be called when you click on a tab.
They are called when you try to shift focus to any other
control on the form.
Anyone else come across this problem???
Many Thanks
SeanR
[Edited by SeanR on 10-05-2000 at 05:57 AM]
-
Oct 5th, 2000, 06:23 AM
#2
Do you have the validation code in the Validate event of the TextBoxes?
I've tried putting an SSTab on a form and added a TextBox to the first tab. Added some code in the validate event (of the textbox) made sure the textbox had the focus and then clicked on the second tab. The validate code then ran perfectly.
I use VB6 Enterprise SP3.
-
Oct 5th, 2000, 08:56 AM
#3
Thanks for the reply Joacim
This is weird.
I simlfied the whole thing, placed a SSTab on a form
and two text boxes:-
Text1 - with validation code (simply Cancel = True)
Text2 - without
All three control have causes CausesValidation = True
If I try to switch focus from Text1 to Text2
the validation code is triggered as it should
If I try to switch focus from Text1 to a tab
the validation code isn't triggered.
-
Oct 6th, 2000, 09:59 AM
#4
VB6 and finally SP4
I've got it sorted
As long as all my text boxes and labels are contained
within a frame on each tab of the SSTab validation
is triggered when a tab is selected, otherwise not.
Strange !!!
FYI
Put an SSTab on a form, put a text box on the 1st tab
and in the Validate sub put Cancel = True
Now run it, once the text box is selected you can't
select a tab, everything is as it should be.
Now put a label on the 3rd tab, run it again
and hey presto you can select tabs, which seems
pretty strange to me.
Put that label in a frame and everything works again
Thanks again for your reply
SeanR
-
Jan 10th, 2001, 04:43 PM
#5
New Member
I had the same problem with validation and the SSTab control. Using your information, I put all my labels on frames and now I no longer have the problem. It is a great workaround. Thank you.
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
|