Hide a Textbox When Combo is selected

Dale1992

New member
Local time
Today, 06:22
Joined
Feb 22, 2016
Messages
8
Morning :),

i am currently making a database it is in use however i have been asked about making a certain improvement. i have a Textbox then i have visable on open, however as soon as anything is typed in the combobox i want it too become invisable i have tried the following method but i am not sure what the controlling collumn is in my combo box.

Private Sub Combo58_Change()
If Me.Combo58 = "Cranks" Then
Me.Text167.Visible = False 'Hide the first text box
Me.Text167.Enabled = False 'Disable the first text box
End If
End Sub

Any Help would be greatly appreciated.
 
Try:
Code:
Private Sub Combo58_Change()
  If Me.Combo58.Column(1) = "Cranks" Then
    Me.Text167.Visible = False 'Hide the first text box
  End If
End Sub
 
Yes, no point in disabling the text box if it's hidden.
 
Try this:

Code:
Private Sub Combo58_[B]AfterUpdate[/B]()
  If Me.Combo58.Column(1) = "Cranks" Then
    Me.Text167.Visible = False 'Hide the first text box
  Else
    Me.Text167.Visible = True
  End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom