Library Database fines query

  • Thread starter Thread starter Marko
  • Start date Start date
M

Marko

When you say add the table finerates to query does this
mean I have to make a relationship? How do I do this? I
did what you said and it hasn't worked so this is the
only thing I can think of.

My original problem if anyone else can help is:

My Library database which I am building requires me to
work out fines. Fines are charged to borrowers who return
books after the due date for return. The fines applied
are:

£0.30 - [seven days late over and including]
Additional £0.30 - [14 days late over and including]
Additional £0.40 - [21 days late over and including]
Aditional £0.50 - [28 days late over and including]
Additional £1.50 - [56 days late over and including]

I have a Loan Date field, Loan Due field and Returned
Date date field what would the formulae be to work out
these fines? - They are fixed.
 
Marko

You are making it very difficult to follow your progress in resolving your problem when you don't stay on thread. A thread is when you ask a question (a new post) and one or more people answer (they post replies). Then if you have more questions or you don't understand a reply, while reading the reply, you reply to them (using the REPLY button, NOT the NEW button)

As to the formula, you can try this

you should have a column in the query (from Duane Hookom's reply on 3/27 1:11pm

DaysLate: DateDiff("d",[Loan Due], [Returned Date]

To calculate the fine, In another column enter (all on one line)

FineAmt: (([DaysLate]>=7)*0.3+([DaysLate]>=14)*0.3+([DaysLate]>=21)*0.4+([DaysLate]>=28)*0.5+([DaysLate]>=56)*1.5) * -

Remove the * -1 at the end if you want the fine amount negative

HT
Stev
 
Back
Top