Results 1 to 7 of 7
  1. #1
    merlin777 is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    117

    dealing with an unknown number of events

    I'm designing a database to track paintings. One of the things i need to record is where they've been exhibited. They may be exhibited any number of times from none up to an unlimited number of dfferent exhibitions.

    I'm not sure how to approach this with an indefinite number of events. I can't have a variable number of fields, i can't creat a huge number of empty fields that probably won't be used and i can't use a table for every painting because there'll be hundreds.



    Any thoughts?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Events are records, not fields. I see 3 tables: paintings, events, and a many-to-many junction table to record a painting being at an event.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    merlin777 is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    117
    so i need a table which records all exhibitions, but how do you specify which of those exhibitions each painting has been to?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    In the third table. You could use a form based on either the events table or the paintings table, depending on how you want to view, and a subform bound to the third table. There's also this for adding multiple items at once:

    http://www.baldyweb.com/MultiselectAppend.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    merlin777 is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    117
    what i'm not understanding is how the paintings table, for each painting, records which exhibitions it's been to. if its been to exhib A and exhib B, how does that appear on the painting table?

    Also not quite sure how record the dates for the same reason. A venue may not be temporary and a painting may go there several times.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    It doesn't, it appears in the third table. At that point it's like any other one-to-many relationship. One painting can appear in many events, thus you use a related table.

    You could include from/to dates in the junction table, and a painting could appear in that table multiple times with different dates for the same venue.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Perhaps clarifying, the third table might look like:

    Painting...Event....StartDate...EndDate
    .....1...........A..........9/1/15......9/15/15
    .....1...........B..........9/16/15....9/25/15
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Error on SendObject method - Unknown recipient
    By Glenn_Suggs in forum Access
    Replies: 4
    Last Post: 07-11-2013, 12:11 PM
  2. Replies: 3
    Last Post: 05-23-2013, 05:30 PM
  3. Replies: 13
    Last Post: 06-20-2011, 12:18 PM
  4. Unknown Error
    By pimlicosnail in forum Forms
    Replies: 1
    Last Post: 02-26-2010, 10:19 AM
  5. Report printing unknown blank lines.
    By dgrzalja in forum Reports
    Replies: 10
    Last Post: 11-02-2009, 12:21 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