I feel like this should be a simple problem, but I'm still new to VBA and am having trouble figuring it out.
I have a form that has a text box giving some information, but I only want the text box to show if the account name is a specific name.
So if the account name is "Longhaul" then the text box should show in the form. If the name is anything else, the text box should not be visible
I have the following code:
<code>
If WCAccountName = "Longhaul" then
textBox.Visible = true
Else
textBox.Visible = false
end if
</code>
But since it is a text box there are limited ways in the property sheet to put in any code. "On Mouse Move" sort of works, but doesn't refresh when I change between records, and besides I feel like there should be a more efficient way of doing this.
Any help is appreciated!
I have a form that has a text box giving some information, but I only want the text box to show if the account name is a specific name.
So if the account name is "Longhaul" then the text box should show in the form. If the name is anything else, the text box should not be visible
I have the following code:
<code>
If WCAccountName = "Longhaul" then
textBox.Visible = true
Else
textBox.Visible = false
end if
</code>
But since it is a text box there are limited ways in the property sheet to put in any code. "On Mouse Move" sort of works, but doesn't refresh when I change between records, and besides I feel like there should be a more efficient way of doing this.
Any help is appreciated!