Full_Williams
Registered User.
- Local time
- Today, 00:23
- Joined
- Jul 2, 2002
- Messages
- 88
Hi,
I'm getting "Run time error '3251' Operation is not supported for this type of object" on the:
If ctl.Value <> ctl.oldValue then line.
I'm asking the user if he/she wants to keep the changes made to the form. If not then replace the changes with the old value.
This code was working fine for me until I added tab pages on my form. Any thoughts on what the problem might be.
Any help is appreciated.
Thanks,
Full Williams
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Then
If ctl.Value <> ctl.OldValue Then
ctl.Value = ctl.OldValue
ElseIf IsNull(ctl.OldValue) Then
ctl.Value = ctl.OldValue
ElseIf IsNull(ctl.Value) Then
ctl.Value = ctl.OldValue
End If
End If
If ctl.ControlType = acComboBox Then
If ctl.Value <> ctl.OldValue Then
ctl.Value = ctl.OldValue
ElseIf IsNull(ctl.OldValue) Then
ctl.Value = ctl.OldValue
ElseIf IsNull(ctl.Value) Then
ctl.Value = ctl.OldValue
End If
End If
Next ctl
I'm getting "Run time error '3251' Operation is not supported for this type of object" on the:
If ctl.Value <> ctl.oldValue then line.
I'm asking the user if he/she wants to keep the changes made to the form. If not then replace the changes with the old value.
This code was working fine for me until I added tab pages on my form. Any thoughts on what the problem might be.
Any help is appreciated.
Thanks,
Full Williams
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Then
If ctl.Value <> ctl.OldValue Then
ctl.Value = ctl.OldValue
ElseIf IsNull(ctl.OldValue) Then
ctl.Value = ctl.OldValue
ElseIf IsNull(ctl.Value) Then
ctl.Value = ctl.OldValue
End If
End If
If ctl.ControlType = acComboBox Then
If ctl.Value <> ctl.OldValue Then
ctl.Value = ctl.OldValue
ElseIf IsNull(ctl.OldValue) Then
ctl.Value = ctl.OldValue
ElseIf IsNull(ctl.Value) Then
ctl.Value = ctl.OldValue
End If
End If
Next ctl