Posted By

heislekw on 04/17/09


Tagged

control tag ctl


Versions (?)

Use tag property to handle multiple controls


 / Published in: Visual Basic
 

  1. Dim ctl As Control
  2.  
  3. For Each ctl In Forms!frmAssets
  4. 'For Each ctl In Me.Parent
  5. If ctl.Tag = "**" Then
  6. ctl.Visible = False
  7. ElseIf ctl.Tag = "***" Then
  8. ctl.Visible = False
  9. ElseIf ctl.Tag = "*" Then
  10. ctl.Visible = True
  11. End If
  12.  
  13. Next
  14. Set ctl = Nothing
  15.  
  16. Dim ctl As Control
  17.  
  18. For Each ctl In Me
  19. If ctl.Tag = "*" Then
  20. If IsNull(Me.PtLName) Then
  21. ctl.Enabled = False
  22. Else
  23. ctl.Enabled = True
  24. End If
  25. End If
  26. Next
  27. Set ctl = Nothing

Report this snippet  

You need to login to post a comment.