Fines

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

Marko

I have a question about this suggestion you gave me:

You could then add in your day ranges and fine amounts
into the table. You
can then add this table to your query and create a
calculated column
DaysLate: DateDiff("d",[Loan Due], [Returned Date])
set the criteria under this expression to
=finFromDays AND < finToDays

What do you mean by a calculated column you gave me the
fields: finfinID, finFromDays, finToDays and finAmount.
Which of these fields do I select for my query?

Is there not just one big expression to work out my fines?

£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]

Many Thanks
 
Once you start a thread, you should continue to reply to the same thread.

Add tblFineRates to your query. The calculated column is:
DaysLate: DateDiff("d",[Loan Due], [Returned Date])
Add the finAmount field to the grid to get the fine amount in your query.

There is an expression that would work but it would require you to open your
query (or code) to change it when your fines changes. I make it a priority
to not write code or expressions where a small change in business rules
would require someone maintaining code or expressions. This information
should be maintained in data where anyone can easily change them to meet the
needs of the organization.

If you want an expression that would have to be maintained, look up Switch()
or IIf() in Help.

--
Duane Hookom
MS Access MVP


I have a question about this suggestion you gave me:

You could then add in your day ranges and fine amounts
into the table. You
can then add this table to your query and create a
calculated column
DaysLate: DateDiff("d",[Loan Due], [Returned Date])
set the criteria under this expression to
=finFromDays AND < finToDays

What do you mean by a calculated column you gave me the
fields: finfinID, finFromDays, finToDays and finAmount.
Which of these fields do I select for my query?

Is there not just one big expression to work out my fines?

£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]

Many Thanks
 
Back
Top