Re: ValidateControls (?)



Jan:

Thank you for answering. I will try to explain what happen with
"ValidateControls". I am using VB6, MDI Application. In forms (MDIChild) I
only put controls for enter and/or choose infomation; buttons are placed in
two ToolBars at MDI form.

For example, when I write some info in a TextBox in a MDIChild form and
suddenly try to push a button in ToolBar MDI form, Validate Event IS NOT
INVOKED.

It is correct! ToolBar controls has not "CausesValidation" property, so they
cannot follow the sequence to validade prior control.

That is why I put "ValidateControls" at begining ToolBar Click Event, and
"IT WORKS" because it invokes Validate Event belonging prior control used.

PROBLEM IS, next Validate Event, AN ERROR OCURRS:

Run-time error '380': Invalid property value.

so, I have to "skip" error with syntax you already knows.

If I put "ValidateControls" in "Knowed Searchers", I only receive... please
try... I cannot explain links with "Anti-Info"...

Once again, thank you very much. I hope to have news from you very soon.

--
Luis Garcia
IT Consultant


"Jan Hyde (VB MVP)" wrote:

LUIS <LUIS@xxxxxxxxxxxxxxxxxxxxxxxxx>'s wild thoughts were
released on Fri, 30 May 2008 14:19:01 -0700 bearing the
following fruit:

I am using ValidateControls in VB6 at ToolBar Click Event like this

If (Forms.Count > 1) Then

On Error Resume Next

ActiveForm.ValidateControls

If (Err.Number <> 0) Then
Err.Clear
Exit Sub
End If

End If

and works, but causes an error, that is why Error sequence is used.
Can somebody tell me how to use it?

Beforehand, thank you very much.

Want to give us a hint as to what the error is?
--
Jan Hyde

https://mvp.support.microsoft.com/profile/Jan.Hyde

.