anyone know Access VBA?

Permabanned
Joined
24 Dec 2002
Posts
474
Location
Chelmsford, Essex. Bling Bling
Ive got a few checkboxes on an Access form and i want to loop through them checking to see if theyre ticked or not, im doing this at the moment....


Code:
    Dim chkObj as Checkbox
    
    
    For Each chkObj In Me.Controls
        If chkObj = False Then
            Select Case chkObj.Name
.
.
.
.
            End Select
        End If
    Next

Now it goes into the for..each loop once then when it hits the Next i get a type mismatch error. Any ideas?
 
thanks for that peeps, ill give it a bash tomorrow. I didnt think i had to check for the object type since id already defined it as a checkbox, so i was hoping it would essentially be "for each checkbox on the form do this"

Anyway, ta for the help, fingers crossed thatll work.
 
Back
Top Bottom