G
Guest
Hi,
I'm rubbish at VB so need a little help setting this up please. I want to
create a Cancel button that will return all the values in the form to the old
value. I found the oldvalue property and put this into the OnClick
Private Sub Command39_Click()
Dim ctlTextbox As Control
For Each ctlTextbox In Me.Controls
If ctlTextbox.ControlType = acTextBox Then
ctlTextbox.Value = ctl.OldValue
End If
Next ctlTextbox
End Sub
Do I have to set the oldValue for each control On Open? If someone could
help me out with the code for this I would really be grateful.
I'm rubbish at VB so need a little help setting this up please. I want to
create a Cancel button that will return all the values in the form to the old
value. I found the oldvalue property and put this into the OnClick
Private Sub Command39_Click()
Dim ctlTextbox As Control
For Each ctlTextbox In Me.Controls
If ctlTextbox.ControlType = acTextBox Then
ctlTextbox.Value = ctl.OldValue
End If
Next ctlTextbox
End Sub
Do I have to set the oldValue for each control On Open? If someone could
help me out with the code for this I would really be grateful.