C
colvind
Hi folks. I've got a form with a bunch of checkoxes that are worth
varying numbers of points, i.e. some check boxes are worth 5 points,
some worth 12, etc..
I also have a total points earned box at the bottom of the form.
The function I've created/modified works and as you check or uncheck
the checkboxes, the value in the tally box increases or decreases.
However, one item I've still stumbling on.
One of the checkbox values is 2.5. But for whatever reason, only 2 is
included in the tally. The .5 gets left off. There are four check
boxes worth 2.5. When all checkboxes are checked, the tally should
add to 100. But because the .5's aren't being read, the final tally
only adds to 98.
Is it just I need to express the decimaled value differently in my
function?
Below is the function text for the first 4 checkboxes:
Ctl1_1 is the name of a checkbox, same as Ctl1_2, etc
If Me.Ctl1_1 = True Then
lngItem1Val = 2
Else
lngItem1Val = 0
End If
If Me.Ctl1_2 = True Then
lngItem2Val = 2.5
Else
lngItem2Val = 0
End If
If Me.Ctl1_3 = True Then
lngItem3Val = 2
Else
lngItem3Val = 0
End If
If Me.Ctl1_4 = True Then
lngItem4Val = 2.5
Else
lngItem4Val = 0
Do I need to express the decimal value differently in my function?
varying numbers of points, i.e. some check boxes are worth 5 points,
some worth 12, etc..
I also have a total points earned box at the bottom of the form.
The function I've created/modified works and as you check or uncheck
the checkboxes, the value in the tally box increases or decreases.
However, one item I've still stumbling on.
One of the checkbox values is 2.5. But for whatever reason, only 2 is
included in the tally. The .5 gets left off. There are four check
boxes worth 2.5. When all checkboxes are checked, the tally should
add to 100. But because the .5's aren't being read, the final tally
only adds to 98.
Is it just I need to express the decimaled value differently in my
function?
Below is the function text for the first 4 checkboxes:
Ctl1_1 is the name of a checkbox, same as Ctl1_2, etc
If Me.Ctl1_1 = True Then
lngItem1Val = 2
Else
lngItem1Val = 0
End If
If Me.Ctl1_2 = True Then
lngItem2Val = 2.5
Else
lngItem2Val = 0
End If
If Me.Ctl1_3 = True Then
lngItem3Val = 2
Else
lngItem3Val = 0
End If
If Me.Ctl1_4 = True Then
lngItem4Val = 2.5
Else
lngItem4Val = 0
Do I need to express the decimal value differently in my function?