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

Memo to self: there are no line breaks in this code.

Just keep typing and let the code wrap in the Zoom box.

Are the Videos Overdue?

You need an equation that calculates the number of days since the movie was rented, then subtracts those days from the video rental (1 day, 2 day, etc).

 

This calculation looks complex, but it really isn’t. You created part of the code for the DaysRented and Rental fields.

 

Insert one more column into the query grid and add the following code:

 

Overdue: IIf(Left([Description],1)-DateDiff("d",[DateRented],Now())>DateDiff("d",[DateRented],Now()),"Not Overdue","Overdue")

Home ->View ->Query Design