Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with expressions 1

Status
Not open for further replies.

Xenos132

Technical User
Dec 12, 2004
43
CA
I have a Query and Report of our employees weekly billed hours. In this report I have a PO column and an Hours column. Right now I just use a text box with =Sum([Hours]) to show me the hours and this works great. However now I would like to add the PO area to the Sum.

I have reserved all PO numbers below 1000 to our maintenance accounts and all PO numbers above 1000 to service. So what I would like to know is how many hours are billed to service and how many to maintenance.

I know it should be something along the lines of

If PO < 1000 Sum Hours =

As you can see I am weak with expressions, Can some lend a hand?
 
Try:
=Sum(Abs(PO<1000) * [Hours])
and
=Sum(Abs(PO>1000) * [Hours])
This assumes your PO field is numeric.


Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top