As the title says, I am being faced with an issue where my Access applications hangs on the line (see below). THis function is being called from somewhat of a busy form.
End Function
I have done quite a bit of research to try and pin point the issue.
I stepped through the code watching the locals window looking for hanging objects.
I have verified that all recordsets are being dealt with appropirately (there happens to be none actually).
I have converted any sql strings in the properties dialog to saved queries (I thought this would help due to the form having quite a few controls).
I have added error handling t the function to see if there were any issues. Peculiarly enough, the error handling does alleviate the issue temporarily. After a short session of banging on the form that calls the function, eventually it'll go back to the hanging. If I open and reclose the DB this also helps. THis tells me that something is bloating/hanging in the back ground, but Im not sure what else I need to check.
Any pointers, advice or suggestions would be greatly appreciated
function
Public Function IsAdmin() As Boolean
On Error GoTo IsAdminErr
Dim errany
IsAdmin = AdminUser ' adminuser is a global variable that is set on file open
Debug.Print ;
IsAdminCleanUp:
Exit Function
IsAdminErr:
If DBEngine.Errors.Count > 1 Then
'ODBC Error
For Each errany In DBEngine.Errors
Debug.Print ; errany.Number
Debug.Print ; errany.Description
Next errany
Else 'Access Error
Debug.Print ; errany.Number
Debug.Print ; errany.Description
End If
GoTo IsAdminCleanUp
End Function