Hello,
I have the following code in my form, but I need the code to loop when the user, doesn't have access to the PC...Right know what happens is that when the user doesn't have access I get the message "YOU DON'T HAVE ACCESS FROM THIS PC" and it still logs him in. I want it to EXIT and not log him in........I am not to sure if I need a loop...
This is the code
**********************
'Specifies codes to agents
If Me![CompCycle].Column(0, 0) <> "" Then
strComputerName = Me![CompCycle].Column(0, 0)
If strComputerName = "1" Then
MsgBox ("I AM A CONTROLLER")
ElseIf strComputerName = "2" Then
MsgBox ("I AM A VOUTER")
ElseIf strComputerName = "3" Then
MsgBox ("I AM A PRINCESS THE ONE AND ONLY")
Else
'NOTHING
End If
Else
MsgBox ("YOU DON'T HAVE ACCESS FROM THIS PC")
End If
I have the following code in my form, but I need the code to loop when the user, doesn't have access to the PC...Right know what happens is that when the user doesn't have access I get the message "YOU DON'T HAVE ACCESS FROM THIS PC" and it still logs him in. I want it to EXIT and not log him in........I am not to sure if I need a loop...
This is the code
**********************
'Specifies codes to agents
If Me![CompCycle].Column(0, 0) <> "" Then
strComputerName = Me![CompCycle].Column(0, 0)
If strComputerName = "1" Then
MsgBox ("I AM A CONTROLLER")
ElseIf strComputerName = "2" Then
MsgBox ("I AM A VOUTER")
ElseIf strComputerName = "3" Then
MsgBox ("I AM A PRINCESS THE ONE AND ONLY")
Else
'NOTHING
End If
Else
MsgBox ("YOU DON'T HAVE ACCESS FROM THIS PC")
End If