I have form with several text boxes that are populated by a procedure called from a combo box from which the user makes a selection.
I want to create a Cancel button to undo any unsaved changes to the text boxes so I have copied the following code from the Access Help file but get 'error 2448. Can't assign value to this object.'
Sub btnUndo_Click()
Dim ctlC As Control
' For each control.
For Each ctlC In Me.Controls
If ctlC.ControlType = acTextBox Then
' Restore Old Value.
ctlC.Value = ctlC.OldValue
End If
Next ctlC
End Sub
Any ideas?
I want to create a Cancel button to undo any unsaved changes to the text boxes so I have copied the following code from the Access Help file but get 'error 2448. Can't assign value to this object.'
Sub btnUndo_Click()
Dim ctlC As Control
' For each control.
For Each ctlC In Me.Controls
If ctlC.ControlType = acTextBox Then
' Restore Old Value.
ctlC.Value = ctlC.OldValue
End If
Next ctlC
End Sub
Any ideas?
