Hi all - I recently made many changes to a working FE (I say this because I don't know what change caused this issue).
I have a "logout" button on a form which runs the following function:
Code:
Public Function CleanUpandRestart()
Dim intLoop As Integer
For intLoop = (Forms.Count - 1) To 0 Step -1
DoCmd.Close acForm, Forms(intLoop).Name
Next intLoop
TempVars.RemoveAll
DoCmd.RunMacro "Autoexec"
End Function
The autoexec function loads a login form which used to work great. On a successful login, it would open the same form as the logout button is on.
The issue is when the database is opened for the first time, everything works as it should. However, when the logout button is clicked and the user logs back in, three things happen:
- I get a write conflict error (attached)

- I get a macro error (attached)

- Access stops responding and dies (error attached)
If I press the logout button, then exit the login form (leaving all forms closed), I can rerun the autoexec and login properly.
The form that a successful login opens is an unbound form but it does have several subforms on it which are bound to different queries. No changes to the data are being made, so I am a bit confused at the initial "Write Conflict" error.
The backend is a MySQL database and I am not making any SQL calls via VBA on this form, or any of the subforms that are loaded.
Any help would be appreciated.