SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot akohl's Avatar
    Join Date
    Jun 2001
    Location
    Israel
    Posts
    184
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Access 97 subform to input data into "many to many" relationship

    I would like to reference multiple categories for each book and obviously each category can belong to lots of different books. I want to create a book entry form with a categories subform providing drop down lists for each category he wants to enter for each book.

    The access from wizard makes a subform fine if the relationship is a simple one to many relationship between tables. But It didn't give me quite what I wanted when I based the form wizard taks on a queery.

    How do I do this?

    here are the tables

    books_table
    book_id
    book_nam

    books_categories_table
    book_id
    category_id

    categories_table
    category_id
    category_name

  2. #2
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you shouldn't have this type of relationship, it screws things up. you should have an intermediary table that contains keys for both tables....and keep info that way.

  3. #3
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by DLG_1
    you shouldn't have this type of relationship, it screws things up. you should have an intermediary table that contains keys for both tables....and keep info that way.
    I believe that is what the middle table is.

    You have a many-to-many relationship defined, each book can have mutiple categories and each category can have multiple books. Not sure what you're asking/needing.
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  4. #4
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    akohl,

    why don't you post what you're trying to accomplish, not the task, but the why of what you want. I'm sure that there is a solution to that.


Bookmarks

Posting Permissions

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