471,897 Members | 2,191 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,897 software developers and data experts.

Validation problem


I have several controls on a form linked to a dataset. Two of the
controls can be used to populate one field in the dataset (i.e. by
selecting an item from a drop down list to get an id, or by entering
the id manually). I want to force the user to enter one or the other
and currently have Validation on the two controls. My problem is that
I want to be able to move between the two controls without causing the
validation. I thought I could test to see what control is going to get
the focus and bypass the validation if one of the two controls
selected, otherwise raise the validation event, but I don't seem to be
able to do this. When mouse clicking and changing focus the events
will allow me to do this as LostFocus is called first. But pressing
Tab means that all the validation is done before you know which
control is gaining focus.

Can anyone suggest a solution?

Nov 15 '05 #1
0 958

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by Stefan Richter | last post: by
41 posts views Thread by Gérard Talbot | last post: by
3 posts views Thread by Kent Ogletree | last post: by
3 posts views Thread by john morales | last post: by
5 posts views Thread by Chris | last post: by
9 posts views Thread by Bill Long | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.