C
CES
All,
I can't seem to get undo to work properly. If I'm right the correct syntax for undoing any change in the current field is:
Private Sub Category_BeforeUpdate(Cancel As Integer)
Me.Category.Undo
MsgBox (Me.Category.Value) ' Is returning the new value not the original value
End Sub
However, when I try to use this code, it has no effect on the record. The control is a combo box and the name of the control is "Category". If the Me.Category.value = 1 and I change the value to 2 via the combo box when I leave the field and go to the next field in my form the value in Me.Category.Value should revert back to 1.
I was also wondering if there was a way of getting the name of the current control In Focus... by that I mean, in this current case Me.???? What equal "Category". Thanks in advance. - CES
I can't seem to get undo to work properly. If I'm right the correct syntax for undoing any change in the current field is:
Private Sub Category_BeforeUpdate(Cancel As Integer)
Me.Category.Undo
MsgBox (Me.Category.Value) ' Is returning the new value not the original value
End Sub
However, when I try to use this code, it has no effect on the record. The control is a combo box and the name of the control is "Category". If the Me.Category.value = 1 and I change the value to 2 via the combo box when I leave the field and go to the next field in my form the value in Me.Category.Value should revert back to 1.
I was also wondering if there was a way of getting the name of the current control In Focus... by that I mean, in this current case Me.???? What equal "Category". Thanks in advance. - CES