Making unvisible textboxes visible..IF

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!
 
J

Jeanette Cunningham

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
 
P

Piet Linden

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
 

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