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

Calculate late fees

Status
Not open for further replies.

kwj

IS-IT--Management
May 30, 2001
3
US
Hello,

I am trying to develop a report (Summary of Account) that reports outstanding balances and calculates a late fee on balances greater than 30 days past due. No problem there - the problem is that it also calculates late fees (negative) on balances that are less than 30 days past due. I am using the following statements in my query:

DaysAged: DateDiff("d",([DueDate]),Format(Now (),"Short Date"))
Age0to30: [DaysAged] Between 0 And 30
0-30: IIf([DaysAged]<30,&quot;Current&quot;)
Age31to60: [DaysAged] Between 31 And 60
Age61to90: [DaysAged] Between 61 And 90
AgeG_T_91: [DaysAged]>=91
31-60: IIf([DaysAged] Between 31 And 60,&quot;31-60&quot;)
61-90: IIf([DaysAged] Between 61 And 90,&quot;61-90&quot;)
Over 90: IIf([DaysAged]>90,&quot;Over 90&quot;)
fee: ([ttl1]*[dayslate])
BalDue: Sum([charge]-[payment]-[retainer])
Age: DateDiff(&quot;d&quot;,[duedate],Now())
DaysLate: ([age])/15
Ttl1: ([baldue])*0.03
TtlBal: [baldue]+[ttl1]

The forums have been very helpful in my getting this far along in this project (some of the above code may look familiar :) ). Your assistance, time and input are greatly appreciated.

Kindest regards,

Kevin
 
Kevin, I gather this report is based on a query. If so, can you pull the query up in SQL view and cut and paste that here? It seems easier (at least for me) to look at that then to look at the default view. Terry M. Hoey
 
DaysLate: IIF ([Agd] > 1, ([age])/15, 0) MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Michael - thanks for the assistance it worked just as I had hoped for it to. Now maybe I can quit pulling my hair out.

Terry, appreciate your response as well but looks as if Michael's solution will work for me.

Thanks again to the both of you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top