ed_the_unlucky
Registered User.
- Local time
- Today, 03:04
- Joined
- Jan 28, 2008
- Messages
- 30
Code:
Private Sub Form_Open(Cancel As Integer)
Dim sUser As String
Set sUser = GetWinUserName
If sUser <> "[user1]" Or "[user2]" Or "[user3]" Then
Cancel = True
End If
End Sub
OK, so why won't this code run? i've been beating my head against this for a lot longer than i care to admit, i'll confess.
the desired activity: check for the windows account name (using the module described above), compare to the expressed values in the if/then statement and either permit the access 2000 form to go on opening or close.
thoughts, anyone?
ed