Mar 31 2023 05:56 AM
hi there
I have a small issue in Access that's driving me mad, so asking for some help please.
I have a form that has a few data input fields. For some data entry textboxes, I have an .BeforeUpdate event which should prompt the user to confirm changes were intended, only in case there was a previous value entered in the field. So if the field started empty, it won't prompt for confirmation.
the sub starts with
If IsNull(me.ActiveControl.oldValue) Or me.ActiveControl.oldValue = 0 Then
Exit Sub
end if
Really simple code, but the issue I have is that the .oldvalue property always gives the same value as the current entered .value. So I cannot determine what was in the field before the user entered the new data.
The code event is triggered by the controlsource.beforeupdate event, so I am expecting this to be triggered before the record was changed.
frm.undo resets the form as expected to previous values , activecontrol.undo does not.
I cannot figure our what could cause this, and what work around I can think of. Any help appreciated!
Apr 01 2023 01:45 AM
Apr 06 2023 01:41 AM