Form Help (Subtotal)

The_Vincester

Registered User.
Local time
Today, 13:18
Joined
Jun 6, 2006
Messages
71
I have a form with a control "TypeCode," it's set to:


=IIf(Year(Date())<=Year([date]),[qryVacation.TypeCode],"Other")

So that if the date on the form is less than the current year, the control will return "Other" in the box.

At the bottom of the form, I have a subtotal:

=Sum(IIf([Typecode]="Sick",1,IIf([Typecode]="Half Sick Day",0.5,0)))*8

This helps tally Sick day and Half Sick Days for me, but if they are a year old, then they should not be counted. Once I got the field to say "Other" I thought I was home free, but it is still counting the sick days.

I know it's probably still getting the value from the qryVacation, but how do I have it so it just subtotals off the form iteself?
 
Create a new Field in the Query that does the calculation for you.
 

Users who are viewing this thread

Back
Top Bottom