Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Chicago
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Two Basic Questions - multiple choices (2003)

    Hi All
    How do I set up a table and then a form so that mulitple options from a list can be chosen? Do I have to have a number of separate fields equal to how many choices I think there might be? For example, if there are 8 choices in a list (I currently have a look up list set up) and it's possible that 6 of the 8 could apply to one record, do I have to have that field repeated 6 times?

    Also, in the same database, we'd like to keep track of the number of blood transfusions each patient gets and what day they got them. A patient may receive one on one day, three the next week, one more later one, etc. How can that be captured?

    Thanks much.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Two Basic Questions - multiple choices (2003)

    On your first question: what you describe is known as a many-to-many relationship. This is implemented by using three tables:
    - A main table with a single record for each 'item' from your original table.
    - A lookup table with a single record for each option.
    - An intermediary table with a record for each combination of an 'item' from the main table and an option from the lookup table. So if 5 options apply to 'Item A', there will be 5 records in the intermediary table.

    See <post#=364,203>post 364,203</post#> for a sample database showing how to implement a many-to-many relationship.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Two Basic Questions - multiple choices (2003)

    About your second question: I'd create a new record for each transfusion. Each record contains the Patient ID, the date+time of the transfusion, and relevant medical data about the transfusion.

    This setup provides the most accurate information. It enables you, for example, to accurately calculate the average interval between transfusions. You can easily produce reports that group the data by day, or by week, or by month, and summarize the information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •