Example
Today: Date()
The new field above is named Today and a function... Date() ...is used to calculate today's date
Example
DaysOnLoan: [Today]-[BorrowDate]
The new field above is named DaysOnLoan
Note to create a calculated field you give it a name like any other field and you put a colon : after the name and then put the calculation in
In the DaysOnLoan query above it takes the field Today which you just created and subtracts the BorrowDate that was already in tblTransactions
In our movie store we will charge a customer for one day rental when they leave the store, however if they have late fees the calculated query to determine the amount of days late (not paid for) is:
DaysOnLoan: [Today]-[BorrowDate] -1
Note the -1 portion subtracts the day that has already been paid for.
If you want to determing the MovieFees for a current rental you need to change the above formula to the following:
DaysOnLoan: [Today]-[BorrowDate] +1
Note the +1 portion adds the one day that the customer will pay, otherwise the above formula results in 0 days