Hello all,
I have a form which allows amendments of records. Before a combo-box on the form can have its contents changed, I am displaying a vbyes/no message box, which explains the consequences of a change and offers the facility to cancel the change. When the change is cancelled, I'd like the combo-box to retain/revert back to its old value. I can do this with
or
But these reverse all of the changes to the form, whereas I only want the change to this one field reversed. I've tried storing the ID in the combo-box in a public variable in the before update event, in the hope that if the user selects the cancel option of the message box (vbno) then in after update I can change the (now changed) combo-box back to its original value. However, the ID value stored in the public variable in the before update event is actually the value that it is being updated to. Why doesn't this work? And is there any easier way to do this?
Thanks in advance,
Matthew
I have a form which allows amendments of records. Before a combo-box on the form can have its contents changed, I am displaying a vbyes/no message box, which explains the consequences of a change and offers the facility to cancel the change. When the change is cancelled, I'd like the combo-box to retain/revert back to its old value. I can do this with
Code:
Cancel = True
or
Code:
Me.Undo
But these reverse all of the changes to the form, whereas I only want the change to this one field reversed. I've tried storing the ID in the combo-box in a public variable in the before update event, in the hope that if the user selects the cancel option of the message box (vbno) then in after update I can change the (now changed) combo-box back to its original value. However, the ID value stored in the public variable in the before update event is actually the value that it is being updated to. Why doesn't this work? And is there any easier way to do this?
Thanks in advance,
Matthew