473,564 Members | 2,749 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 1182
"IanH" <hi********@yah oo.co.uk> wrote in
news:11******** *************@u 72g2000cwu.goog legroups.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********@yah oo.co.uk> wrote in
news:11******** **************@ j33g2000cwa.goo glegroups.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
1803
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. I'm in the process of automating the procedure by changing to a .php website with the Hall of Fame powered by a mysql database, but what I'm trying...
1
1437
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" attributeFormDefault="unqualified"> <xs:element name="e"/> <xs:complexType name="ct1"> <xs:choice> <xs:any namespace="##any"/> </xs:choice>
13
1847
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 in an email message, Outlook "hijacks" the open browser and opens opens the link in it. Is there a way to prevent this? To somehow identifiy that...
1
1365
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. Is there any way in ado (or another way useable from asp / vb) that I can run the query and then fetch a number of rows at a time? I can then e.g....
6
3773
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 one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps...
0
986
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 displayed due to the error code being set to 400 (the page cannot be displayed page). I found an article that had this snippet of code that you can...
7
1528
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 this, to record the useage as new elements are declared and then compare this useage to an upper limit?
1
3176
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 field if the DOS is =>now()-5. Does anyone have any suggestions? Thanks, Lisa
10
1683
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 the URL could open them). I've run across a number of solutions on the web, none however seem to work for me. It's possible I'm just missing...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5213
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
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 we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.