Question How to restrict a field for limited entries in MS Access?

saqibawr

Registered User.
Local time
Today, 09:45
Joined
Oct 3, 2008
Messages
27
I am creating a database of library for my university in ms access. i have to add a restriction in which a student can not borrow more than 5 books. so i have to add a restriction on student id that he is allowed to borrow only 5 books.
In same database i have to create a teachers table. There is no restriction for teachers they can borrow as many books as they want.
So please help me as soon as possible?
 
For the teachers, given that there is no limit on their borrowing you need do nothing.

However for the students you will need to record their borrowing transactions, so that you know when they have reached their borrowing limit.

I would have all your borrowers in the one table, this will mean that you need to have a method of differentiating, each borrowers status as either teacher or student.

There are a number of ways you could track the student borrowers allowance. The simplest would be to have a field that records their borrowing allowance and update this each time they borrow or return a book.
 
Still confusing just tell me that how to add restriction in detail.
 
Here's a very simple DB to demonstrate one approach.

In reality you would probably want to record the title and other details of the books that each borrower has on loan. That would require a number of other tables to store titles and also which titles are on loan to whom.

The basic principal would non the less be the same.
 

Attachments

Thanks a lot John the material you provided was really helpful. :)
 

Users who are viewing this thread

Back
Top Bottom