Results 1 to 3 of 3

Thread: Clear checkboxes on a particular frame ***Resolved***

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Edgerton, WI
    Posts
    381

    Clear checkboxes on a particular frame ***Resolved***

    I have several frames on a form, each containing numerous checkboxes. Is there an easy way to check or uncheck all the checkboxes on a particular frame short of coding each checkbox value?
    Last edited by Rev. Michael L. Burns; May 5th, 2003 at 02:47 PM.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Private Sub ClearCheckBoxesOnFrame(fra As Frame)
    2. Dim c As Control
    3.  
    4.     For Each c In Me.Controls
    5.         If LCase$(TypeName(c)) = "checkbox" Then
    6.             If c.Container Is fra Then
    7.                 c.Value = vbUnchecked
    8.             End If
    9.         End If
    10.     Next
    11.    
    12. End Sub
    13.  
    14. 'usage
    15. ClearCheckBoxesOnFrame Frame1
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Edgerton, WI
    Posts
    381
    crptcblade,


    Thanks, that did the trick.

    Michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width