run-time error 13 ctl.tag (1 Viewer)

yessir

Saved By Grace
Local time
Today, 03:51
Joined
May 29, 2003
Messages
349
I have this:

Code:
Private Sub GetTotal()

    Dim ctl As Control, intScore As Integer
    
    For Each ctl In Me.Controls
        If ctl.ControlType = acCheckBox Then
            If ctl = True Then
                intScore = intScore + ctl.Tag
            End If
        End If
    Next
    
    Me.Points = intScore + Nz(Me.extra_points)

End Sub

which should and does take the tag element of a check box and add or subtract from intScore.

However upon making the form tabular it doesn't work...

any help here?
 

yessir

Saved By Grace
Local time
Today, 03:51
Joined
May 29, 2003
Messages
349
Here's the Kicker

I have Some that work and some that don't on the same form.

the are the same elements with the same checkboxes with the same text values just different records.
 

yessir

Saved By Grace
Local time
Today, 03:51
Joined
May 29, 2003
Messages
349
* Solved *

I had a checkbox (1) without a value in tag. when checked first it would fail as was null

set this to (0) and is all fine now...:)
 

Users who are viewing this thread

Top Bottom