|
-
Sep 21st, 2001, 04:35 PM
#1
Thread Starter
New Member
Validate event not working in ActiveX
Any thoughts on this one?...
I made an activeX control project with two text boxes A and B. Both have CausesValidation = True
If I run this control on a form, the boxes don't generate a validate event? I've researched it quite a bit, and unable to find information on it.
Would greatly appreciate any help. thanks!
-
Sep 24th, 2001, 05:49 PM
#2
-= B u g S l a y e r =-
I tried this, and it worked just fine,
VB Code:
Option Explicit
Private Sub Text2_Validate(Cancel As Boolean)
If Text2.Text = "" Then Cancel = True
End Sub
Private Sub Text1_Validate(Cancel As Boolean)
If Text1.Text = "" Then Cancel = True
End Sub
could u describe in more details the problem u have?
-
Sep 24th, 2001, 08:44 PM
#3
Thread Starter
New Member
Peet, Thanks for your feedback. I actually had something very similar to that. The problem was that the validate events were just not firing when moving focus between different constituent controls on the same ActiveX control
I located a microsoft knowledge base article (Article ID: Q191912) which described the validate event not firing when going from a control on the ActiveX to a control on the Form. It stated that SP5 addressed that bug.
Although the problem I was having was not exactly as described in the article referenced above, I downloaded SP5 and installed it.... and it worked!
But, here's the funny thing. The but that was addressed in the article still happens!... I don't get a validate event when going from a constituent control on the ActiveX to a control on the form!
Did you experience this at all?
Zaig
-
Oct 1st, 2001, 10:40 AM
#4
New Member
as far as I know, SP5 didnt fix the other bug in Validation - when you take press Return to activate a command button with the Default property = TRUE on a form (i.e. your OK button) , the Validate event doesn't fire (same as the original LostFocus bug which Validate wuz supposed to have fixed!!!!)
dunno if thats relevant but its getting late in the afternoon here
-
Oct 1st, 2001, 10:23 PM
#5
Thread Starter
New Member
Active X Validate Event Bug
Thanks for your reply, shirtster.
I agree. With your comment. So what's the way around it?
zaig
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
|