username on a label in form

AC-Dev

What say you, good sir?
Local time
Yesterday, 20:47
Joined
Jun 20, 2011
Messages
81
Good day developers!

Small question. I have a table with employee names, ID's, etc.
When an employee logs in, i take the username from that table and put it into a global variable so i can use it in my switchboard (well at lease i am trying to use it in my switchboard).
On the bottom of my switchboard i have a label and i want it to say "Signed in as: ..." or "Welcome, ......." or whatever it may be.

Basically, how do i pull a variable from my code to use as a label caption?
 
You can only refer to the variable directly in code, so you could use the open or load event of the form to set the caption property of the label. You could also create a public function that did nothing but return the value of the variable, and use it in a textbox:

="Welcome, " & FunctionName()
 
You can only refer to the variable directly in code, so you could use the open or load event of the form to set the caption property of the label. You could also create a public function that did nothing but return the value of the variable, and use it in a textbox:

="Welcome, " & FunctionName()

GENIOUS!
Thanks :)
 
Happy to help!
 

Users who are viewing this thread

Back
Top Bottom