Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

CAN SOMEONE PLZ HELP ME IN ACCESS OFFLINE??

Thread Tools
 
Search this Thread
 
Old 10 April 2002, 06:43 PM
  #1  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Post

I would be grateful if someone can help me offline (E-Mail). I am working on my final year project. It is on Access 2000 and the project is based on a Video Shop. I am 90% finished, but I require help on two functions.

1- Limit the each customer with MAX of 3 videos

2- Cross check reserved item against rentals. This will prevent reserved videos being taken out.

If someone is willing to look at my database via e-mail I would be very grateful.

Vinesh
Old 10 April 2002, 07:05 PM
  #2  
DazV
Scooby Regular
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Post

I imagine you'd have:

customers table (cust_ref, name, address)
videos table (video_ref, title, num_copies)
rentals table (cust_ref, video_ref, return_date)

LIMIT EACH CUSTOMER
To limit each customer to 3 vids, cross-ref their "cust_ref" (customers table) against "cust_ref" (rentals table) and count how many occurences - if its less than 3, let them have it.

RESERVE VIDEO
To reserve a video, treat it like a rental, but put reserved as the return date (or some daft return date). Downside to this is titles can be reserved indefintely, or you could add another field to rentals table like reserved_? with YES/NO field type.

CHECK IF RESERVED
To check if video is reserved cross-ref "video_ref" (videos table) with "video_ref" (rentals table) and count how many occurences - if its less than "num_copies" (videos table)

I'm sure there's lots of ways of doing it - but as for Access / Visual Basic - I'm too rusty to remember, sorry!
Old 10 April 2002, 07:09 PM
  #3  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Post

Yep something like that. Anyone?
Old 10 April 2002, 10:52 PM
  #4  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Post

BTTT
Old 10 April 2002, 11:01 PM
  #5  
Fosters
Scooby Regular
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

are you after the actual SQL? Is the front end in VB?
Old 10 April 2002, 11:04 PM
  #6  
Fosters
Scooby Regular
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

to find the number of vids a customer has
select count(customer) from rentals_table where returned_date is null group by customer;
assuming that you have a rentals_table and you're operating a video is rented to a customer when there is an unended row against them on that table of course
Old 10 April 2002, 11:04 PM
  #7  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Post

If SQL will make it work, then yes I will use that. Access also using VB in the background.
Old 10 April 2002, 11:05 PM
  #8  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Post

Can I send u a copy of my d/b?
Old 10 April 2002, 11:10 PM
  #9  
Fosters
Scooby Regular
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

Is there a reserved table?
select count(a.vid_id), count(b.vid_id)
from rented_table a, reserved_table b
where a.vid_id = [Entered video's ID]
and a.vid_id = b.vid_id
and a.return_date is null
group by a.vid_id, b.vid_id;
assumes that an unended row present on a rented table means it's rented and a row present on the reserved table means reserved (to be deleted when it's rented or put back on the shelf)

add the two fields together and if they're = select count(vid_id) from videos_table where vid_id = [Entered video's ID] then there ain't any more to rent or reserve.
Old 10 April 2002, 11:11 PM
  #10  
Fosters
Scooby Regular
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

yeah go ahead. although if Puff sees this, he'll tell me off.
Old 10 April 2002, 11:13 PM
  #11  
Fosters
Scooby Regular
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

got it. give me a minute.
Old 04 October 2002, 11:13 PM
  #12  
Vinesh
Scooby Regular
Thread Starter
 
Vinesh's Avatar
 
Join Date: Jul 2001
Posts: 1,795
Likes: 0
Received 0 Likes on 0 Posts
Post

Mail sent.

Yes I do have a reservation table.

[Edited by Vinesh - 4/10/2002 11:13:58 PM]
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
02 July 2023 01:54 PM
TylerD529
General Technical
2
09 October 2015 01:53 AM
Littleted
Computer & Technology Related
4
25 September 2015 09:55 PM
blackandgold scooby
ScoobyNet General
3
16 September 2015 03:38 PM
farmerwrx
Computer & Technology Related
14
10 September 2015 11:59 AM



Quick Reply: CAN SOMEONE PLZ HELP ME IN ACCESS OFFLINE??



All times are GMT +1. The time now is 03:50 PM.