Making unvisible textboxes visible..IF

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi again...i use the following code to populate certain text/combo boxes with
certain values...i also want other "controlls" to become visible from the
same code..is that possible?

Private Sub Type_AfterUpdate()
If Me.Type.Value = "NT" Then _
Me.Category.Value = "NTCASE"
Me.Alert.Value = "NTCASE"
Me.Project.Value = "NTCASE"
End Sub

Thanks!
 
Hi Peter,
yes it is possible and easy.

Private Sub Type_AfterUpdate()
If Me.Type.Value = "NT" Then _
Me.Category.Value = "NTCASE"
Me.Alert.Value = "NTCASE"
Me.Project.Value = "NTCASE"
Me.SomeOtherControl.Visible = True

End Sub


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Hi again...i use the following code to populate certain text/combo boxes with
certain values...i also want other "controlls" to become visible from the
same code..is that possible?

Private Sub Type_AfterUpdate()
If Me.Type.Value = "NT" Then _
    Me.Category.Value = "NTCASE"
    Me.Alert.Value = "NTCASE"
    Me.Project.Value = "NTCASE"
End Sub

Thanks!

How about...
Me.Controls("MyControl").Visible=True

Or, if you're toggling a bunch...

Sub ToggleVisibleControls(byval blnVisible As Boolean)

Me.Controls("MyControl1").Visible=blnVisible
Me.Controls("MyControl2").Visible=NOT blnVisible

End Sub
 
Back
Top