"IanH" <hi********@yahoo.co.uk> wrote in
news:11*********************@u72g2000cwu.googlegro ups.com:
hi,
I am currently developing an access database for a video
library. I have a Videos Rented Table that includes the
Rental ID, Video ID and the Copy Number. I want to restrict
the amount of videos taken out by each member to 3. How would
i go about doing this.
Thanks
Ian
Videos Rented table should include the Member ID and Date
Returned. Then you use the Dcount() function to validate that
the number of active rentals is <= to your max_rentals (3).
You can then code the form to prevent further entries.
Dcount("[Member ID]","[Videos Rented]", "[Member ID] = " _
& Forms!CheckOut!txtmemberID & " AND [Date Returned] is null")
--
Bob Quintal
PA is y I've altered my email address.