473,500 Members | 1,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Restricting the amount of entries

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

Mar 25 '06 #1
3 1181
"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.
Mar 25 '06 #2
Hi

I have a Rentals Table that includes the Rental Id, Member Id, Date
out, Date Return, Cost and this table is linked to the VideosRented
Table (Rental id, Video id, copy number).

I don't want to include the MemberID and the Date Returned in the
VideosRented table as i would have redundant data. Can i still use the
above code.

Ian

Mar 25 '06 #3
"IanH" <hi********@yahoo.co.uk> wrote in
news:11**********************@j33g2000cwa.googlegr oups.com:
Hi

I have a Rentals Table that includes the Rental Id, Member Id,
Date out, Date Return, Cost and this table is linked to the
VideosRented Table (Rental id, Video id, copy number).

I don't want to include the MemberID and the Date Returned in
the VideosRented table as i would have redundant data. Can i
still use the above code.

Ian

You would need to make a query joining the two tables.

But I foresee some issues with your structure. Say I'm your
client. I rent three movies on monday. I return one on tuesday,
one on wednesday, one on thursday. How will you track my status
on wednesday?
--
Bob Quintal

PA is y I've altered my email address.
Mar 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1793
by: Finalstryke | last post by:
Hi, I run a hobby-based hall of fame. At the moment people send their stats to me and I manually update the database, run the queries, and convert the results to .pdf which is then put online. ...
1
1426
by: Brett Gerhardi | last post by:
Can anyone explain how I can do the following correctly: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"...
13
1838
by: Dave Holmes | last post by:
Is there a way to keep an other application from opening a link in a browser where I am running an ASP application? For example, I have an ASP application open in a browser. If I click on a link...
1
1364
by: beckham | last post by:
I have a large table with approx 250000 rows in sql 2000. I need to return this from an asp page but the query to return this amount of data causes the asp to time out before the query completes. ...
6
3763
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
0
983
by: Bill Rowell | last post by:
ASP .NET has a built in limit of the request size (which is configurable) of 4MB. So, if a user were to upload a file that exceeded this, an exception is thrown and a not so informative page is...
7
1524
by: vfunc | last post by:
Is it possible to restrict the memory available to a class where say for example it contains an array of elements of varying size or variable size list or a mix of these? Is the normal way to do...
1
3152
by: compl | last post by:
I have a database that I need to restrict the ability to edit one field based on another. The two fields are DOS (date) and Amount (currency). I only want the users to be able to edit the Amount...
10
1677
by: KBTibbs | last post by:
Hi. I'm restricting access to my webpage with forms authentication, but I have some .htm files that I want to restrict as well (by default, ASP.NET does not restrict this, so anyone with access to...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5485
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.