Results 1 to 7 of 7
  1. #1
    markpastoril is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    62

    help me design and connect Senior Citizens Discount Table?


    I want to have a table that will discount the customers water consumed when they are registered as a Senior Citizen how Do I design the table which I can connect to Customers Table and to its Transactions table that automatically discounts?

    this is my table field and relationship connection.

    Click image for larger version. 

Name:	sc discount.jpg 
Views:	38 
Size:	79.5 KB 
ID:	35576

    note i have to change also the way of payments of each customer/s.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    the DiscountRate on the tCustomer table , gets added to the tTrans table for each transaction, in a query: [AmtDue]-(AmtDue*DiscountRate)
    tCustomer table could also have [PayVia] , for how the customer pays via cash,card,acct deduct, etc.

    normally youd make a 'shopping cart' like all the internet uses.
    tCustomers, tTransactions, tOrderDetails (for all items bought)

  3. #3
    markpastoril is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    62
    but i want to keep the information of customers with senior citizens registration e.g. senior citizens id,date of registration, and the municipality where she/he was registered and also I would like it to have an expiration date which they are require to update they're senior discount registration, the expiration date is one year after the date of registration and if not updated it will automatically changes to unregistered status and the should stop.

  4. #4
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,002
    That's weird, surely once you are a senior citizen you always are?
    Unless you are Benjamin Button ?

    You need to store you transactions as per Ranmans suggestions, at the moment you will have a nightmare making this work as you get further into it...
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    Join Date
    Apr 2017
    Posts
    1,679
    Quote Originally Posted by markpastoril View Post
    but i want to keep the information of customers with senior citizens registration e.g. senior citizens id,date of registration, and the municipality where she/he was registered and also I would like it to have an expiration date which they are require to update they're senior discount registration, the expiration date is one year after the date of registration and if not updated it will automatically changes to unregistered status and the should stop.
    Then you need table:
    tblSeniorCitizenCustomers: SCCID, CustomerID, MunicipalityID, [RegDate0], RegDate, ExpireDate
    Where RegDate is updated every year, and ExpireDate is automatically updated whenever RegDate is updated (usually calculated fields aren't kept in tables, but I think here is a good reason to make an exception).

    A saved query (e.g. qCurrentSeniorCustomers) returns a list of customers registered as Senior Citizens at current date
    Code:
    SELECT * FROM tblSeniorCitizensCustomers WHERE ExpireDate Is Not Null AND ExpireDate > Date()
    You can use LEFT JOIN to link the saved query with table Transactions, and to get info is the customer Senior Citizen (SCCID Is Not Null) or not (SCCID Is Null).

  6. #6
    markpastoril is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    62
    Quote Originally Posted by Minty View Post
    That's weird, surely once you are a senior citizen you always are?
    Unless you are Benjamin Button ?

    You need to store you transactions as per Ranmans suggestions, at the moment you will have a nightmare making this work as you get further into it...
    We need to update the senior citizen registered customer,coz we need to make sure/confirm if the customer is still active/deceased.

  7. #7
    markpastoril is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    62
    I've forgot to tell you that the senior citizens discount will deduct only if the (previous reading-present reading)consumption of the customer is equal or less than 30 cubic.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. senior monent - creating forms
    By Jen0dorf in forum Access
    Replies: 6
    Last Post: 05-27-2016, 01:14 AM
  2. How to connect table
    By manish2952 in forum Queries
    Replies: 1
    Last Post: 04-26-2013, 03:02 PM
  3. Replies: 10
    Last Post: 10-31-2012, 08:20 AM
  4. How I can connect access table in browser
    By learning_graccess in forum Programming
    Replies: 1
    Last Post: 04-04-2012, 04:40 PM
  5. Replies: 5
    Last Post: 03-29-2009, 07:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums