This is the situation: Everyone has an annual standard (txtAnnualStandard) there
are currently 3 different values 1144, 763, or 572 in the 13 records.
There is one person who is prorated. His annual standards once prorated is
763. His months of service is 8.
The annual standard needs to be divided by 12 giving 1144 = 95.33 or 572 =
47.67. The prorated guy is divided by 8 so 763 / 8 = 95.38.
txtProrated (Value yes/no) and txtMonthsProrated (number of months prorated)
are textboxes on the form but are not visible.
Problem is that everything comes back to 95.33. I thought I had it working correctly, but it isn’t. Here is the code
Private Sub Report_Activate()
‘ Figure monthly standard prorated vs non prorated
Dim sngMonthlyStandard As Single
txtMonthlyStandard = sngMonthlyStandard
If [txtProrated] = False Then
txtMonthlyStandard = ([txtAnnualStandard] / 12)
Else
[txtProrated] = True
txtMonthlyStandard = [txtAnnualStandard] / [txtMonthsProrated]
End If
End Sub
If anyone has any ideas I would appreciate the help. Fay