General information
Category:
Forms & Form designer
Since control never really leaves the control when Ctrl+S is pressed, the valid event will not fire first.
I recommend setting up a form-level validation method that is called when a save is requested. The validation routine will check all fields, possibly based on a property in the hosting control(s). If a field is invalid, focus is set to the control and the Save is denied.
Another advantage of this is that users can freely move through all fields for heads-down processing before having to stop to correct some data. You can still have individual controls call the validation method, if desired.
If this approach does not work for you, try executing the control's valid event as follows:
thisform.activecontrol.valid()
Hope this helps.
Greg Willcockson
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only