J
John Ortt
I am using the following code to check who is accessing the database and log
them out if they are not me.
I would like to insert a delay before Access shuts down after the
unauthorised user closes the message box, could anybody assist me in doing
this please.
Thankyou,
John.
Code follows:
Function Logoffcode()
Static MsgSent As Integer
Dim Logoff As Integer
Dim LO As Boolean
Set Db = CurrentDb() 'Note the table must be attached
'for CurrentDb() to work or use a
'connect string to the server db.
UserName = [Forms]![MainMenu].[UserBox]
If UserName = "B643603" Then
MsgBox "Hi"
Else
MsgBox "The Application will now shut down."
Application.Quit
'Log them off
End If
End Function
them out if they are not me.
I would like to insert a delay before Access shuts down after the
unauthorised user closes the message box, could anybody assist me in doing
this please.
Thankyou,
John.
Code follows:
Function Logoffcode()
Static MsgSent As Integer
Dim Logoff As Integer
Dim LO As Boolean
Set Db = CurrentDb() 'Note the table must be attached
'for CurrentDb() to work or use a
'connect string to the server db.
UserName = [Forms]![MainMenu].[UserBox]
If UserName = "B643603" Then
MsgBox "Hi"
Else
MsgBox "The Application will now shut down."
Application.Quit
'Log them off
End If
End Function