I have a textbox on a form in an Access 2013 database. The OnClick event in this textbox closes another form that is normally open. In case the form is already closed, I have put simple error check code in the OnClick event of this textbox as follows:
On Error Resume Next
DoCmd.Close acForm, "frmLast3ItemTransactions", acSaveNo
On Error GoTo 0
I realize this is sort of sloppy, but it works (until...)
When I add a button to this form that runs a macro when clicked, I get the generic "Access has detected a problem and will close" error when I click my textbox. When I replace the macro in the button with VBA code, I no longer get the error when I click the textbox. I have macros in other databases that seem to work just fine.
I have heard that Access 2013 has had some issues with macros, but I have heard nothing specific. Can someone expand on this? Should I just avoid macros altogether? Have these issues been resolved in Access 2016? Any enlightenment will be appreciated.