Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2013
    Posts
    7

    Issue with one to many relationship

    Hi guys,



    I am a super noob when it comes to Access, but I'm pretty handy with Excel and VBA programming and my wife just started a business that could use a database to store client information and so on so I'm giving it a go. I'm having an issue already though with building relationships. Quick background about the business: It's a wedding and event floral company; the process is, a customer signs up, receives a quote for an event, each event has multiple flower arrangements and each arrangement has multiple flowers in it. That being said, I have the following tables:

    tblCustomer
    tblQuote
    tblEvent
    tblArrangement
    tblFlowers

    I have created relationships between the tables as I have read about and what seemed logical and everything worked except for the relationship between tblArrangement and tblFlowers. FlowerID is the primary key for tblFlowers and a secondary key in tblArrangement. As each arrangement will have multiple flowers, yet individual flowers can be in multiple arrangements I'm a bit stuck. Further, Access will only allow me to create a one-to-many relationship with tblArrangement as the related table, no other way. Am I missing something here or is there a better way to go about this?

    Thanks in advance for the help I'm sure I'll need over the next few days, but hopefully it won't be long before I can answer a few questions myself on the forum!

    Best,

    Ryan

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Consider:

    tblArrangements
    ArrangementID (primary key)
    ArrangementName
    ArrangementPrice

    tblFlowers
    FlowerID (primary key)
    FlowerName

    tblArrangeFlowers
    ID (primary key)
    ArrangementID (foreign key)
    FlowerID (foreign key)

    tblQuote
    QuoteID (primary key)
    EventID (foreign key)

    tblQuoteDetails
    QuoteID (foreign key)
    ArrangeFlowersID (foreign key)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Further to June7's advice:

    - do Quotes become Orders?
    -need a table for Event
    -you will/may need a Date field on Event, Quote..
    -you may need CustomerId on Quote

    If you include Price on the Arrangement, you should consider that the CurrentPrice. When you "sell" an arrangement(s) to a Customer, add a field to handle Quantity of Arrangements and AgreedUponPrice. This will allow you to change the Price of an Arrangement without modifying all your existing records. It also allows you to have Sales, Clearance Items, Loyalty Program, Discounts etc.

    Good luck with your database project.

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

Similar Threads

  1. Relationship issue on my form
    By BigMac4 in forum Access
    Replies: 4
    Last Post: 08-30-2012, 07:27 AM
  2. Possible Relationship Issue?
    By Bill Sperry in forum Forms
    Replies: 7
    Last Post: 03-20-2012, 11:29 AM
  3. Relationship issue
    By Calgar99 in forum Access
    Replies: 4
    Last Post: 12-14-2011, 07:36 PM
  4. relationship issue or filter by subform?
    By flwrgrl in forum Forms
    Replies: 9
    Last Post: 07-14-2011, 02:07 PM
  5. Relationship screen Issue!
    By Lincoln in forum Access
    Replies: 8
    Last Post: 07-14-2011, 04:16 AM

Tags for this Thread

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