Private intLoginAttempts As Integer
intLoginAttempts = intLoginAttempts + 1
If intLoginAttempts > 3 Then
DoCmd.Quit
MsgBox "You do not have access to this database. Please contact your system administrator.", vbCritical, "Restricted Access!"
End If
End sub