I'm having trouble with some code.
Currently I have code that undoes any changes and closes a form without saving changes on the click of a button which works fine.
I now want to say if another form is opened, force the close of the first one (undoing any changes and not saving.)
I've tried using the on deactivate running the code that previously worked (Me.Undo & a macro that closes without saving the form) but the action fails (property not found) when trying to run the close macro.
How can I fix this?
Currently I have code that undoes any changes and closes a form without saving changes on the click of a button which works fine.
I now want to say if another form is opened, force the close of the first one (undoing any changes and not saving.)
I've tried using the on deactivate running the code that previously worked (Me.Undo & a macro that closes without saving the form) but the action fails (property not found) when trying to run the close macro.
How can I fix this?