johndoomed
VBA idiot
- Local time
- Today, 14:26
- Joined
- Nov 4, 2004
- Messages
- 174
This is a real simple question, I think. But I cant get it to work.
I want to change the value in a textbox. The form (and box) is connected to a table. This is my code:
As you can see, I want to change the value of the textbox [Person ID] based on which user (Windows) is loged in.
What do i get wrong?
I want to change the value in a textbox. The form (and box) is connected to a table. This is my code:
PHP:
user = Environ("USERNAME")
If user = "jel" Then
[Person ID] = 1
ElseIf user = "nho" Then
MsgBox ("Testing NHO")
Else
MsgBox (user)
End If
As you can see, I want to change the value of the textbox [Person ID] based on which user (Windows) is loged in.
What do i get wrong?