|
-
Jan 10th, 2007, 09:27 AM
#1
Thread Starter
Member
[RESOLVED] validation question
if focus is currently on control A and the user clicks on control B. What property of what control needs to be set for control A to be validated?
-
Jan 10th, 2007, 09:29 AM
#2
Re: validation question
VB Code:
A.CausesValidation = True
-
Jan 10th, 2007, 09:38 AM
#3
Re: validation question
VB Code:
B.CausesValidation = True
-
Jan 10th, 2007, 10:43 AM
#4
Thread Starter
Member
Re: validation question
so the CausesValidation property of control A needs to be = True?
-
Jan 10th, 2007, 10:51 AM
#5
Re: validation question
What controls are you using?
By default, the CausesValidation property is set to true on all textboxes and command buttons (and probably others as well.)
-
Jan 10th, 2007, 11:04 AM
#6
Thread Starter
Member
Re: validation question
clicking a control button
-
Jan 10th, 2007, 11:24 AM
#7
Re: validation question
 Originally Posted by bhs00
clicking a control button
You want to validate a control button's click?
-
Jan 10th, 2007, 11:38 AM
#8
Re: validation question
 Originally Posted by bhs00
so the CausesValidation property of control A needs to be = True?
no (but as Hack said, it's normally defaults to True). If a control has CausesValidation = True, then before it's due to receive focus, it fires the _Validate event in the control that has just lost focus, geddit?
-
Jan 10th, 2007, 11:43 AM
#9
Re: validation question
 Originally Posted by bushmobile
If a control has CausesValidation = True, then before it's due to receive focus, it fires the _Validate event in the control that has just lost focus, geddit?
Which, in turn, won't do anything unless you have code in the controls validate event.
(Command Buttons don't have a Validate Event so it has always made me giggle that it is a CausesValidation property. )
-
Jan 10th, 2007, 11:48 AM
#10
Re: validation question
 Originally Posted by Hack
(Command Buttons don't have a Validate Event so it has always made me giggle that it is a CausesValidation property. )
CausesValidation has no bearing on the button (i.e. on itself), only on the control that the button gains focus from, which may very well have a _Validate event.
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
|