To see the true error number and message, add the line in BLUE to the code:
Code:
Private Sub Form_Load()
On Error GoTo Err_Handle:
'//lots of code here
Exit Sub
Err_Handle:
MsgBox Err.Number & ": " & Err.Description
MsgBox "You do not currently have access to the Turnover Database and cannot use the Turnover Tool." & vbCrLf & vbCrLf & "Please request the MCA role 'THIS IS THE ACCESS ROLE YOU NEED.", vbExclamation, "Unable to Access Database"
DoCmd.CloseDatabase
End Sub
There is a difference between a user that does not have R/W access to a folder and getting an error and you renaming tables and getting an error.
Have a user that does not have R/W access try and open the dB to get the error number.
Here is an example of one of my error handlers:
Code:
login_open_error:
Select Case Err.Number
Case 3078, 3024, 3044 ' table not there
MsgBox "The data files are not available. Please locate the Back End Database now."
btnSelectBE_Click
Case Else
MsgBox Err.Number & ": " & Err.Description
Resume login_open_exit
End Select
End Sub