By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Validating Event Problem Resolution

P: n/a
Joe
Hi

For a while now I have been finding postings of problems with the
validating event not firing on controls properly. I too had this
problem. The event would fire when clicking on another control which
had it's causes validation property set to true however if I tabbed on
to this control the event wouldn't fire. So after playing around with
my code I figured out how to get it to work. I am not sure what the
reason behind it is but it works.

I was originally using a method to handle multiple validating events
for the sake of less coding and to utilise one of the features in .NET
eg

Private Sub cmbCombo_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles cmbPlanner.Validating,
cmbPlannerPOLine.Validating, Handles cmbManufacturer.Validating,
cmbManufacturerPoline.Validating

This event would not fire when I tabbed of it for some reason. I then
changed the code to handle each individual event and viola! e.g.

Private Sub cmbPlanner_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles cmbPlanner.Validating
Private Sub cmbPlannerPOLine_Validating(ByVal sender As Object, ByVal
e As System.ComponentModel.CancelEventArgs) Handles
cmbPlannerPOLine.Validating

Private Sub cmbManufacturer_Validating(ByVal sender As Object, ByVal e
As System.ComponentModel.CancelEventArgs) Handles
cmbManufacturer.Validating

You get the Picture.... I am pretty sure this works ;)
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.