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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

total_to_date

Status
Not open for further replies.

site

Programmer
Oct 23, 2001
44
AT
Hello,

I try to compute Total_to_date.

eg: FIELDS:

FINES DATE
$200.00 8/2/01
$300.00 8/6/01
$600.00 8/7/01
... ...

I want to create subform for total fines that means when I select date(8/6/01), the subform total_fines needs show up for $500.00.

Can help me out how to write this query to expree for "total fines to date".

Many Thanks.
Jing
 
Try this...
Code:
SELECT IIf([DATE]<[What Date?],1,0) AS boolDate, Sum[FINES] AS [SumOfFINES] FROM [FIELDS] GROUP BY IIf([DATE]<[What Date?],1,0) HAVING (((IIf([DATE]<[What Date?],1,0))=1));

You will have to fill in the names of stuff yourself but this is generally what you want to do. The hardest questions always have the easiest answers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top