krishnanhemanth
Registered User.
- Local time
- Tomorrow, 01:12
- Joined
- Jun 12, 2009
- Messages
- 115
hi all
i have a textbox "loginname" on a form that displays the window login name
i use the function =fosusername() to get the user login name...working fine
what i then do is ....
i have a combobox that lists all the usernames-----from a table
i need to compare the value selected from the combobox to the textbox "loginname"
i coded this
If Me.cboEmployee.Value = Me.loginname.Value Then
Me.loginname.Enabled = True
Else
Me.loginname.Enabled = False
MsgBox "login not approved. Please contact your system administrator.", vbCritical, "Restricted Access!"
'APPLICATION.Quit
End If
it dosent seem to work
please help
hemanth
i have a textbox "loginname" on a form that displays the window login name
i use the function =fosusername() to get the user login name...working fine
what i then do is ....
i have a combobox that lists all the usernames-----from a table
i need to compare the value selected from the combobox to the textbox "loginname"
i coded this
If Me.cboEmployee.Value = Me.loginname.Value Then
Me.loginname.Enabled = True
Else
Me.loginname.Enabled = False
MsgBox "login not approved. Please contact your system administrator.", vbCritical, "Restricted Access!"
'APPLICATION.Quit
End If
it dosent seem to work
please help
hemanth