Help With Library DB Calculations

adenwalker

Registered User.
Local time
Today, 18:25
Joined
Jan 18, 2005
Messages
39
I have created a library database with four tables Book, Copies, Students and Loan.

What I want to be able to have is when a book is loaned out it takes the value from the Loan Period field (number of days) and adds it to the Out field in the Loan table (excluding Saturdays and Sundays). I have spent hours looking in these fourms and the web but can't seem to crack it after many attempts.

I would be extremley grateful if anyone could modify the database below to help me out.

Thanks in advance.
Aden
 

Attachments

Last edited:
Great, thanks, I managed to create the due date using the Control Source field.
Now, is it possible to exclude saturdays and sundays and how do i put the due date into a field so it can be used in queries etc.

Thanks
Aden
 
Now, is it possible to exclude saturdays and sundays and how do i put the due date into a field
To exclude Saturdays and Sundays from a loan period, you will need to use some VBA code. To put the due date into a field, you can use a bound form.

In these forums there are many code samples for finding the number of weekdays between a start date and an end date. It seems what you needed is just the other way round: Given a start date and the number of weekdays, Find the end date which must also not be a Saturday or Sunday.

Maybe some code experts here can come up with a solution.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom