Administrator: Receipts Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

Edit the Query

3. Recalculate the Overdue Rentals

Close any forms you might have open.

Open: rptCustomerReceiptSQ.

Save As rptCustomerReceiptByDateSQ.

 

Open rptCustomerReceiptByDateSQ in Design View.

 

The query calculations are based on:

  DaysRented: DateDiff("d",[DateRented],Now())

 

Determine the status of the movie rentals.

Create a new field with the following code:

 

   Status: IIf([DateReturned] Is Null,"Outstanding",[DateReturned])

 

In words this means: if there is no return date ( Is Null), then display the text, "Outstanding."

 

Save your changes and test the query.

Query Design Tools ->Design