• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

Selecting multiple checkboxes in a database form

I wish to write a piece of VB code which will select all of the checkboxes in a form to reset them to their default value before the next string in my VB. How can this be done?
0
tgtbt23
Asked:
tgtbt23
  • 2
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
You need to loop through the Controls collection:

Dim x As Control

    For Each x In Me.Controls
        If TypeName(x) = "CheckBox" Then
            x.Value = vbUnchecked
        End If
    Next
0
 
CleanupPingCommented:
tgtbt23:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
Éric MoreauSenior .Net ConsultantCommented:
Points to emoreau.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now