Results 1 to 14 of 14
  1. #1
    Steven19 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jun 2020
    Location
    London
    Posts
    110

    Table Design Ideas

    Hi

    I'm looking to build a new element to my database, but need some ideas how to put paper to programming.

    Concept:

    I have a back office to my database. The Manager can create a Rates Sheet and in that sheet he has the following Fields:


    • TariffID - PK
    • TariffName
    • TariffDescription
    • IsActive
    • TariffType (Combo Box to group Tariff Types for a report)


    The Manager can add new rate items turn old ones off if they aren't relevant anymore.

    Where I'm Stuck:


    From the customer side I have 150 customers I need to be able to go to a "Tariff / Rates Page" and Add a Tariff. So what will happen is that I get the Above information open on the customer page, and there is an extra field where we can add custom values to each tariffname. Each customers tariffs are different, but not the structure of the tariffs.

    How would I bet go about relating these or putting this together?

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi
    So each Customer would only ever have 1 Tariff?

    Can you give us some examples of a Customers specific Tariff?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  3. #3
    Steven19 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jun 2020
    Location
    London
    Posts
    110
    To not give away company info I have given examples only:

    Customer 1: (Wants a small product designed)


    Labelling Service: £5.00 per Item
    Graphic Design Concept Art: £650 per Mock-up
    Printing Costs: £20p per page


    Customer 2: (Wants a medium product designed)

    Labelling Service: £15.00 per Item
    Graphic Design Concept Art: £1250 per Mock-up
    Printing Costs: £1.40p per page

    So the services are the same but the costs are different.

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    So the service you provide for All Customers will only ever have the 5 sections:-

    Labelling Service
    Cost per Item

    Graphic Design Concept Art
    Cost per Mock-Up

    Printing Costs
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  5. #5
    Steven19 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jun 2020
    Location
    London
    Posts
    110
    Actually we presently have 39 services, but the manager may wish to add more as we grow or reduce them based on our growth, but we will offer the same services to all customers, but one customer may pick just 5 depending on their need.

  6. #6
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Can you give some examples of other Services?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,914
    I would expect you to have a table for services.
    A table to join customers to services with costs for each customer, if prices can be different per customer?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #8
    Steven19 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jun 2020
    Location
    London
    Posts
    110
    Correct prices can be different for customers. If one customer wishes to have specific designs or graphics used or bespoke graphics, that can cost more than someone wishing to use standard graphics.

  9. #9
    Steven19 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jun 2020
    Location
    London
    Posts
    110
    Website Design
    Database Programming
    Photography
    Flyers
    Menus
    Billboards
    Posters
    Stationary
    Endorsements
    Online Advertising
    Radio Advertisements

  10. #10
    Steven19 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jun 2020
    Location
    London
    Posts
    110
    So I would have 1 record for the customer then a junction table, then the table for services with multiple items in it.

    Without going into every record manually and adding all the services to a customer, how could I populate the junction table either using code on the form or a function so that my customer gets access to every service?

    I've seen a video on you tube from Richard Rost from Computer Access Learning Zone who has sort of given me an idea in his Customer Pricing video, but he manually adds the customer to items in the actual junction datasheet using the Foreign Keys there, I don't want that combersom task.

  11. #11
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,914
    Well, you could group the items as jobs. So your first example would add those 3 entries?
    Any special work would be added manually, or a specific task not required deleted?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  12. #12
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    This is a simple structure to cover what you need:-

    tblCustomers
    -CustomerID - Autonumber - PK
    - Customername
    -(Other fields to describe the Customer)

    tblCustomerServices
    -CustomerServiceID - Autonumber - PK
    -CustomerID - Number - LongIntger - FK (Linked to PK from tblCustomers)
    -ServiceID - Number - LongIntegr - FK (Linked to PK from tblServices)
    -Qty
    -ServiceCost

    tblServices
    -ServiceID - Autonumber PK
    -Service (Contains the list of your 39 Services)
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  13. #13
    Steven19 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jun 2020
    Location
    London
    Posts
    110
    Thank you.

    I have that all set up.

    Before I get into it, how do I populate the junction table?

    I have 150 customers, and each will have access to the 39 options. That is 5850 records to add.

    There must be a way to automate this. I can create a button on a form to run an append query to add the ServicesID into the tblCustomerServices every time we go to the customer record and look to add the rates. However how do I get the CustomerID into the tblCustomerServices 39 Times automatically?

    Regards

  14. #14
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    how could I populate the junction table either using code on the form or a function so that my customer gets access to every service?
    The junction table isn't for all the possibilities, it's for what actually took place. So if you want it to contain history it may or may not be possible to do it with queries - would depend on your current tables. If you only want the table to contain records going forward, then you will be creating records in forms as you go. The junction table needs to relate customer table and service table records for their job/order. If they request 3 services, the CustID will be there 3 times for the order (and so would the order ID if you have that in another table), once per service. Likely you'll need to have a price field in the junction table since there's no standard price for a service.

    That being said, in the OP you stated
    Each customers tariffs are different, but not the structure of the tariffs.
    I don't think tariff and customer are related so don't try to make it so. Unless I'm not understanding the terminology here, a tariff is a job/service and you'd list those. If the same tariff name has different set rates, you need a record for each combination. If you determine the rate on the fly, then you don't necessarily need a record for each combination, but it will make it easier to re-use the information that's being created.

    The rest of it seems like it's the classic customer table related to orders table related order details table. The order details table would contain the tariff and the rate, which is either established or added on the fly.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Form Design Ideas
    By Steven19 in forum Forms
    Replies: 5
    Last Post: 03-09-2021, 05:43 AM
  2. UI Design Ideas (Just for Fun)
    By AccessPower in forum Database Design
    Replies: 22
    Last Post: 01-13-2017, 04:06 PM
  3. Design Ideas?
    By Voodeux2014 in forum Database Design
    Replies: 3
    Last Post: 10-26-2015, 11:24 AM
  4. Replies: 1
    Last Post: 05-13-2015, 02:25 PM
  5. Design Ideas
    By ajs112 in forum Access
    Replies: 4
    Last Post: 10-08-2014, 02:35 PM

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