Fire validating event c

If I click my OK button, the Form1_Validating event does not fire. If the validation fails I will put up a message and stop the form from closing. I can do my form validation in the closing event, but I have no immediate way of determining if the user is trying to submit the form or is cancelling it.

It seems to me that this is what the Validating event should be for, but I can't get it to fire. Cancel = False End Sub Or is it the validating itself, it fires before or after that a control lost focus (this depends if it keyboard, mouse or the focus method). Cor Hi C J It may all be tied up with the same, I'm not sure.

On the other hand do I not understand why you want to use the validate of a form for that.

I have the OK button set as the Accept Button and the Cancel button as the ... I click OK and the form closes, without going to the Form1_Validating event. TIA Charles Could someone please explain to me, in words of one syllable or less, how I get the Validating event to fire for a form.

Could someone please explain to me, in words of one syllable or less, how I get the Validating event to fire for a form.

I have a form with one text box, and two buttons: OK and Cancel. Cancel = False End Sub Or is it the validating itself, it fires before or after that a control lost focus (this depends if it keyboard, mouse or the focus method). Cor This sounds an aweful lot like the problem I've been having with the Closing event and validation.

'Validating' is always firing as expected and the form doesn't close if I set 'e. I am still left pondering, though, how and when the Form1 Validating event is ever called. I would be grateful if someone could post the most trivial of examples where this event fires. I'd still say that the validating event is there to validate a control when it looses the focus.

Cancel' to 'True' in the 'Validating' event handler. Wagner [MVP] I have played around with it a lot and I was not able to repro your problem. Then I could probably begin to understand what makes it tick.

Search for fire validating event c:

fire validating event c-14fire validating event c-7fire validating event c-65fire validating event c-60

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “fire validating event c”

  1. I copy the email here, hopefully it gives you an outline, this is what it is like to date a sociopath. He told me he had a 45k a year job, and would move in with me paying 3 months in advance. It was all designed to give the illusion that he had money.