Here's my code Private Sub Save() For each c as control in Me. (It doesn't cost anything extra.) Private Declare Function Lock Window Update Lib "user32" (By Val hwnd As Long) As Long Lock Window Update(Me.
Visual Studio lets you specify property values at design time for a variety of components; using that approach for defining validation attributes is a natural extension, and makes incorporating robust validation simpler for developers. Set Error(txt Student Name, "Please enter student name") Else Error Provider1. Show("Data submited successfully.") End If If chk Age. check out the following url for another simplest one article related to this article... Add(txt Student Name, "Student Full Name") My Error Provider. 'If any mandotary field is empty this function displays a message and returns FALSE. Check And Show Summary Error Message = True Then Message Box. The Error Provider component displays an error icon () next to the relevant control, such as a text box; when the user positions the mouse pointer over the error icon, a Tool Tip appears, showing the error message string.The Error Provider component's key properties are Data Source, Container Control, and Icon.
Search for errorprovider validating:
In this case, you needn't cycle through every control and call its Select method to force validation. NET Application Architect, Enthusiast, & Evangelist T. Bradley - news: OH**************@TK2MSFTNGP04gbl... |I have a windows form that I want to force validation on controls (text | boxes) when the user clicks a "Save" button.