I need help with my expression codes...

euniceee

New member
Local time
Today, 01:44
Joined
Feb 7, 2006
Messages
7
I would like the textbox named "text7" to show the word "keswick" when the text inside the "txtUsername" is KH and show the word "Lawrence" when the text inside the "txtUsername" is LH. What sort of codes should I write? should it be SQL or Expression Builder or Code Builder? Thank you=)
 
Create a combobox with a list value and in your list value code it as you wish I think would be the easist way.
 
This depends on when the txtUserName gets the KH or LH. Is it OnLOad or does the user select it.

In the Form OnLoad event
if Me.txtUserName = "KH" then me.text7 = "keswick"
if Me.txtUserName = "LH" then me.text7 = "lawrence"
or
Select Case Me.txtUserName
Case "KH"
me.text7 = "keswick"
Case "LH"
me.text7 = "lawrence"
End Select


and in the AfterUpdate event of txtUserName use the same code.
 

Users who are viewing this thread

Back
Top Bottom