hi,
set the causes validation property of the control to false.
But only if you never want it to cause validation. If that's not the case, you may have to work around it. A couple of ideas:
Create a SetControlActiv e Sub and invoke it instead of setting Enabled directly. In the Sub:
- Turn off "causes validation"
- Enable or disable (perhaps depending on a parameter)
- Turn on "causes validation"
Create a form-level flag to indicate "don't validate at the moment". In any of the validation routines, check the flag and exit if it is set. That will allow you to turn the validation for everything on/off as desired.
You could go further and create such a flag for each control, but that would just be duplicating the "causes validation" property, so would be a waste of time.
Comment