Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dependancy of text box visibility 1

Status
Not open for further replies.
Aug 24, 2005
56
US

Hello All,

How would you make the visibility of txtboxA dependant on a value in txtboxB, so that txtboxA is only visible when txtboxB displays the value "Yes".

thanks,

kevin
 
Hi!

Use Conditional Formatting from the Format menu.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Set Visible to False in the Properties Box for txtBoxA, then:

Code:
Private Sub txtBoxB_BeforeUpdate(Cancel As Integer)
   If txtBoxB = "yes" Then txtBoxA.Visible = True
End Sub

Code:
Private Sub Form_Current()
  If txtBoxB = "yes" Then
    txtBoxA.Visible = True
  Else
    txtBoxA.Visible = False
  End If
End Sub

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Private Sub txtBoxB_BeforeUpdate(Cancel As Integer)
txtBoxA.Visible = (txtBoxB = "Yes")
End Sub

Private Sub Form_Current()
txtBoxA.Visible = (txtBoxB = "Yes")
End Sub

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top