I am trying to determine if any textbox has changed in a form and here is the code so far:
Private Sub FormChange()
Dim sMsg As String
Dim sTxt As TextBox
sMsg = "Data has been changed. Save the new data?"
For Each sTxt In Form1
If sTxt = True Then
'do the save stuff here
End If
Next sTxt
End Sub
Though when it gets to for each part I get a type mismatch msg.
Any help is appreciated.
Kim
Private Sub FormChange()
Dim sMsg As String
Dim sTxt As TextBox
sMsg = "Data has been changed. Save the new data?"
For Each sTxt In Form1
If sTxt = True Then
'do the save stuff here
End If
Next sTxt
End Sub
Though when it gets to for each part I get a type mismatch msg.
Any help is appreciated.
Kim