display control based on the value in another control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
Back
Top