Unbound Control Filtering

TechNat

Registered User.
Local time
Yesterday, 21:39
Joined
Jul 1, 2008
Messages
14
Is there anyway to filter a unbound control within a report?

I have a unbound control with an IIF statment to determine the total hours per employee on that report. The only problem is that I need to filter the record if the hours are 80 and above.

There are a few other variables that make up to the 80 hours, such as holiday, vacation, and sick pay. Regular pay is added with the other variables to get to the 80.

I need to take the Total Hours from the Report and use that to filter the query. Is there anyway to do this?
 
Put the calculation into the report's underlying query instead of on the report itself. Then it will become a field that you can filter by.
 
Thanks for the help, but I already tried that. I am getting some errors when trying this within the query.

Here is the expression that I am using

=IIf([CheckDate]=[CheckDate],Sum([HoursReceiptAmtWages]))

When I run the query, I get an error,

"You tried to execute a query that does not include the specified expression 'Dept' as part of an aggregate function."

I have all my tables linked, but no luck.

Any ideas?
 
This error has very little to do with the Iif statement. You need to put Dept in your group by clause (and possibly some other columns).

Do you realize your Iif statement will always evaluate to true? Thus, it is not required and you can just use the Sum.
 

Users who are viewing this thread

Back
Top Bottom