cheking if data changed if the form

yaniv

Centurion
Joined
Apr 15, 2002
Messages
167
Location
israel
I have a large form with a lot of textboxes and i want to check if any data have chenged in one of them before closing the form, are there is a way to check it in the entire form or should i write a routine to each textbox?
 
Create a sub in the form that handles all of the textbox's.

Eg

Sub CheckForChanges (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox1.TextChanged, txtbox2.TextChanged

ischanges = true

End Sub


Put each txtbox in there and then in the sub have a global variable as boolean. Then when you close the form see if the ischanges is true so you can save changes.

Hope you understand this

Steve
 
Back
Top