Please help, question on my school coursework.

  • Thread starter Thread starter mjpzx2
  • Start date Start date
M

mjpzx2

Guest
OK I'll start by giving some background detail. This is my major project and I am creating a system for the school library. I am using Microsoft Access 2003. I have made a query and my end user will type in the date that a book is loaned out. My database then automatically fills in the duration it is loaned for, the date is due back. What I hope someone on here can tell me is:

Can I get the current date on my database. So that it updates all the time to always keep the current date. Then I can make it automatically work out how many days late the book is (if it is).

Anyone who can answer this question or point me in the right direction is a hero!
Thanks, Michael.

EDIT: OK I have found how to make the late field update automatically. Late: Date()-[DateDue]. But surely if it can do this and know the current date for use in an equation it can display the current date? Anyone know how to do this?
 
Last edited:
Hi mjpzx2

Check the function, now().

Hope it helps.:p

Robert88
 
Wow! thanks for that! :) Anyway I can get rid of the time? Also have a couple more questions. (access can drive you to insanity)

As I was saying I managed to get the LAte to update automatically. This would make the fine go up more and more every day. Which is exactly what I want it to do. However I do want it to stop sometime :p The current equation in totalfine is [fineperday]*[late]. However I want it to stop going up when a value is entered for DateIn. (because the student has given in the book so the fine should stop at what it is when given in).

Another problem/question is I have a tick box in the same query. It is called Paid but I am going to change this to something along the lines of "Paid/ReturnedOnTime". When I tick this I want that record to move to another table which I will probably call completed transactions.

I will probably have more questions as time goes on but as soon as these queries are finished, forms are a doddle. Thanks for the help so far Robert.
 
Hi mjpzx2,

For your first issue I would check the IIF() function.

For your second issue check append query's in order to move the data to another table.

It is now bed time for me now, good night.....:p

You can also use the search facilities on this site, it has plenty of examples.

Good Luck

Robert88
 
Thanks I will try that out. Just seen you live in Australia :) Good Night.
 

Users who are viewing this thread

Back
Top Bottom