Results 1 to 11 of 11
  1. #1
    Ekim is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    5

    Multiple Tables Joined ????

    I am about to create an Access Database for a company that Has a few diverse product lines.



    I want to have a different table/form for each type of product

    Example

    tblArtGlass

    tblCoatings

    tblBricks

    I want to be able to create elaborate Pricing engines and track other product specific details with completely different Tables/Forms.

    When Creating work orders or placing orders,
    I want to be able to see and choose from all the Separate product tables but be treated as a single product listing.


    Will a Union Query do what I need?
    How do I link it all together with primary keys.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Will these 3 product tables all have the same fields? If so, should just be one table with another field for ProductType (values of Glass, Coatings, Bricks). Yes, a UNION query could be used to combine the 3 tables into the one structure, so why not just start with that table anyway. UNION queries cause trouble in VBA. Opening a recordset from a UNION query or any query based on a UNION query will not work (or so I experienced). Having to resort to UNION query is an indication of bad design. It is easier to 'split' a table by use of filters.
    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
    Ekim is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    5
    The 3 tables will have some of the same fields like SKU, Item, Wholesale Price, Retail Price etc...
    I want to have 3 completely different interfaces for developing and managing different product types. But I want all the Basic Product types to be merged into one list of products when it comes to placing orders etc.

    They will have several other fields that are product specific.

    As I explore Union Query..
    It seems like a nifty way to see a list of something, but not a very good way of integrating and tracking data.

    Thanks for your time...

  4. #4
    dblife's Avatar
    dblife is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2011
    Location
    South Shields, UK
    Posts
    104
    i have to agree with jun7 here.
    much easier to filter data later than try to join badly structured data.
    a product is a product.
    my advice?
    make a list of the attributes every product has, such as part number, weight, colour - you get the idea.
    this is your product table.
    if one product line is say, engines and another product line is books and you want to record engine size for those engines but also isbn number for books then it might be time to create sub tables with those unique attributes as 1-1 relationships with the main record.
    a sub table holding book details would obviously only relate to books in the main table and a sub table for engines would only have related records for engines in the main table.
    not sure how easy that is to understand - let me know if you need further explanation.

  5. #5
    Ekim is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    5
    Thanks dblife,

    Yea, I understand doing the sub tables...
    Thats what I wound up doing...
    I was just hoping for some other slick way to hook stuff up.

    Part of my quest also has to do with building a quote engine.

    Where I can take different Tables/Forms and build assemblies/quotes Line item style with a sub form.
    If only I could build a way to choose from several form/tables on each line item of a sub form in datasheet view.

    That would allow me to bid fairly complicated jobs easily.

    Thanks,
    Ekim

  6. #6
    dblife's Avatar
    dblife is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2011
    Location
    South Shields, UK
    Posts
    104
    there is another approach.
    you would have the same main product table.
    a table for attribute names... enginecc, isbn, pinsize, roughnessindex - all obscure stuff in one table.
    you would then bring these two tables together in a junction tables with the product and attribute(s) applicable to that product.
    another table would allow you record a value aginst a specific product/attribute.
    complicated i know.
    if it is not clear, let me know and i will knock up a quick example in a2003.

  7. #7
    Ekim is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    5
    Thanks dblife

    I understand Junction tables a bit.

    A table between two tables with a joined Primary Key.

    Ive used a Junction table as a 1 to Many before..
    For instance tblCompany having many tblEmployees

    I was actually liking what you had said earlier about putting all the obscure info on another table in a 1to1.

    Thanks for your thoughts on this. It is very helpful.
    I have a small start on this project.
    I want to layout the logic a bit tighter before this thing gets to deep in the rabbit hole.

  8. #8
    dblife's Avatar
    dblife is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2011
    Location
    South Shields, UK
    Posts
    104
    youre welcome.
    the main reason for junction tables is to handle many to many relationships.
    the first approach will allow well formatted forms and reports.
    the second approach will give you flexibility but the forms and reports will come out looking like lists and not look as slick.
    let me know if there's anything else i can help with.

  9. #9
    Ekim is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    5
    Yes.. I know what you mean about the reports DBLife... That was sorta why I was looking for a different way to organize the tables... I may try to master some code to past data into other fields for formatting reports....

    Have you ever used crystal reports?
    Would a program like that give you more reporting options?

  10. #10
    dblife's Avatar
    dblife is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2011
    Location
    South Shields, UK
    Posts
    104
    I know of crystal reports but i have never used it.
    Cannot help you there.
    Sorry.

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Never programmed with Crystal Reports. Worked with other apps that have incorporated it, like a Visual Basic coded app. Costs about $500+.
    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.

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

Similar Threads

  1. Replies: 10
    Last Post: 07-12-2011, 11:09 PM
  2. Replies: 0
    Last Post: 06-15-2011, 07:02 AM
  3. Multiple joins, avoiding cross joined result
    By richjhart in forum Queries
    Replies: 2
    Last Post: 09-17-2010, 09:32 AM
  4. Replies: 3
    Last Post: 07-16-2010, 12:32 PM
  5. Replies: 5
    Last Post: 08-07-2009, 05:23 PM

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