2 replies
by jgitter Accepted solution
by tony hopkinson Accepted solution
in an onleave event.
Save you self a world of hurt.
put a form in to collect claim number enable OK and that passes it in to your current form and displays it read ony if required.
Other options would be
Can you check waht has focu and then skip the validation e.g
If ((!CancelButton.HasFocus) && (InvalidClaimNumber))
Showerror("You must enter a valid claimNumber")
ClaimNumberBox.Focus
Or some such.
to write your validation and call it (except on Cancel button etc) when that gains focus if it , fails show a dialog or something and the put the focus back to teh claim number box.
Careful how you do this sort of thing, lost focus can be fired when you switch application, or show a dialog and such. Sometime windows just swalows it and never fires the event as well.
This discussion is closed to new replies.
Trending Software posts
Sort by Trending