display control based on the value in another control

J

J

What's the syntax for an IF THEN ELSE statement that will do the following:
If the value in txtContractName begins with either "C#" or "L#" then I want
to display txtLocalContact, otherwise I want to not display txtLocalContact
but display txtIntlContact instead. Thanks for the help.
 
K

Klatuu

If Left(Me.txtContractName,2) = "C#" Or Left(Me.txtContractName,2) = "L#" Then
Me.txtLocalContact.Visible = True
Me.txtIntlContact.Visible = False
Else
Me.txtLocalContact.Visible = False
Me.txtIntlContact.Visible = True
End IF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top