Hello folks,
I have a form with 2 buttons on it at the bottom. A Save & Close button that works fine. My problem is with the close button.
On the Close Button, in the OnClick event, I added a 2 step macro.
First is the command UndoRecord
Second step closes the form.
This macro works fine as long as there is something to undo. But if the form is opened and nothing is edited. Then the Close Button gives me an error.
"The command or action 'Undo' isn't available now."
I am a major rookie when it comes to access and VBA.
I searched for a couple hours and could not find a way to check if any fields on the form were changed before executing the UndoRecord command.
If no fields were changed, then the macro should skip to the step of just closing the window.
ANy help would be great...
Thanks.