Something you might check into is if you are using recordsets in code, are they ALL being closed before the sub/function ends? The "rule" I learned was "If you create it, destroy it; If you open it, close it". So if you have code like
Code:
Public Function GetStatus(pNumber As Long) As String
Dim d As DAO.Database
Dim r As DAO.Recordset
Dim sSQL As String
Set d = CurrentDb
sSQL = "SELECT ANumber, Step, StepValue FROM StepTable WHERE ANumber = " & pNumber
Set r = d.OpenRecordset(sSQL)
If Not (r.BOF And r.EOF) Then
'do something
End If
' NO cleanup here!!
End Function
it really should be written:
Code:
Public Function GetStatus(pNumber As Long) As String
Dim d As DAO.Database
Dim r As DAO.Recordset
Dim sSQL As String
Set d = CurrentDb
sSQL = "SELECT ANumber, Step, StepValue FROM StepTable WHERE ANumber = " & pNumber
Set r = d.OpenRecordset(sSQL)
If Not (r.BOF And r.EOF) Then
'do something
End If
'clean up
r.Close ' opened, so close it
Set r = Nothing ' created it (Dim r AS DAO.Recordset )
Set d = Nothing ' created it (Dim d As DAO.Database)
End Function
Since you did not OPEN "d", don't close it!!
If you leave connections open, sometimes Access appears to quit, but is still running. That is when you (sometimes) have to go into background processes to close Access.
Also, how to users quit Access. If they hit the "X" in the upper right hand corner, recordsets might not be closed properly. I have a button to exit Access, asks if you really want to quit and (tries) to ensure connections are properly closed.
Just something that has worked for me....