Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 32
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771

    Do you care which product which group entered/edit for the order?
    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.

  2. #17
    nycman is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2012
    Posts
    31
    Quote Originally Posted by June7 View Post
    Do you care which product which group entered/edit for the order?
    I'm trying to understand your question. Do I care which Group Name entered which product and qty..yes.

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Then that info should be saved in tblOrderProduct, not tblCustomerOrder.

    I still think need to link tblCustomerOrder and tblOrderProduct. Then tblOrder is just a lookup table for selecting group to associate with each product for an order.
    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.

  4. #19
    nycman is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2012
    Posts
    31
    Quote Originally Posted by June7 View Post
    Then that info should be saved in tblOrderProduct, not tblCustomerOrder.
    I'm sorry but you are confusing me with your answers. TblProduct is linked to tblGroupProduct. My whole question was how do I link the ProductID with the CustomerID? And then second question is how do I produce the forms.

    I already have many to many tblCustomer with tblGroup (One customer can have many groups working for them & one group can work for many customers). I also have the many to many tblGroup & tblProduct (one group can have many products & one product can have many groups). In my previous posts I attached my test database to show what I'm trying to do. I'm able to make a tblCustomer Form with tblCustomerGroup subform. I also have a tblGroupProduct subform in the tblCustomerGroup subform.

    Here are the relationships for this project


    Click image for larger version. 

Name:	Test 1 Database.JPG 
Views:	57 
Size:	67.3 KB 
ID:	21934


    Quote Originally Posted by June7 View Post
    I still think need to link tblCustomerOrder and tblOrderProduct. Then tblOrder is just a lookup table for selecting group to associate with each product for an order.
    So link tblCustomerGroup with tblGroupProduct and leave everything else like it is?

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    That confuses me even more. Where is tblCustomerOrder?

    Consider:

    tblProducts
    ProductID
    ProductName

    tblGroups
    GroupID
    GroupName

    tblCustomers
    CustomerID
    CustomerName

    tblOrders
    OrderID
    CustomerID
    OrderDate

    tblOrderDetails
    OrderID
    ProductID
    Quantity
    GroupID
    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.

  6. #21
    nycman is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2012
    Posts
    31
    Quote Originally Posted by June7 View Post
    That confuses me even more. Where is tblCustomerOrder?

    Consider:

    tblProducts
    ProductID
    ProductName

    tblGroups
    GroupID
    GroupName

    tblCustomers
    CustomerID
    CustomerName

    tblOrders
    OrderID
    CustomerID
    OrderDate

    tblOrderDetails
    OrderID
    ProductID
    Quantity
    GroupID


    This is what I wrote in one of my previous posts and I attached a new Database

    "I renamed the tables and fields so it makes more sense. I also created a tblCustomerProduct as a Join table. But still confused of how to make this work with the forms."

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I saw that post and looked at db. Still not sure about your data relationships. I show in previous post what makes sense to me.
    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.

  8. #23
    nycman is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2012
    Posts
    31
    Quote Originally Posted by June7 View Post
    I saw that post and looked at db. Still not sure about your data relationships. I show in previous post what makes sense to me.
    But how do I relate the Product with the Customer? In my sample database if Customer1 is served by Group1 and Group 1 selected Product1, and then if Group1 is also used for Customer 2, Product 1 is already linked to Group 1 so it shows with Customer 2. In "normal" world after Customer 1 is served by Group 1 and they selected Product1 and then when Customer 2 is served by the same Group1 the Product should be empty, now I show product 1.

  9. #24
    nycman is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2012
    Posts
    31
    Quote Originally Posted by nycman View Post
    But how do I relate the Product with the Customer? In my sample database if Customer1 is served by Group1 and Group 1 selected Product1, and then if Group1 is also used for Customer 2, Product 1 is already linked to Group 1 so it shows with Customer 2. In "normal" world after Customer 1 is served by Group 1 and they selected Product1 and then when Customer 2 is served by the same Group1 the Product should be empty, now I show product 1.


    Just please open my test database and select CustomerID 1 and then check under Group 2 you will see there is Product 1 selected. If you go to CustomerID 2 and open the same Group 2 you will see that Product1 is there. If you add Product2 there and go back to CustomerID1 and open Group2 again now there will be 2 products in there Product 1 & Product 2 instead of just one Product 1
    CustomerID 1 should have Group 2 & Product 1 and CustomerID 2 should have Group 2 with Product1 & Product 2.

  10. #25
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I have looked at the db. The relationships do not make sense to me.

    In my suggestion, product and customer are related through tblOrders and tblOrderDetails link. Build a query that includes all tables needed to display related data.
    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.

  11. #26
    nycman is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2012
    Posts
    31
    Quote Originally Posted by June7 View Post
    I have looked at the db. The relationships do not make sense to me.
    lol..I know that is why I'm asking for help.

    Quote Originally Posted by June7 View Post
    In my suggestion, product and customer are related through tblOrders and tblOrderDetails link. Build a query that includes all tables needed to display related data.
    But again. I keep asking the same question.

    - select CustomerID 1 and then check under Group 2 you will see there is Product 1 selected. If you go to CustomerID 2 and open the same Group 2 you will see that Product1 is there. If you add Product2 there and go back to CustomerID1 and open Group2 again now there will be 2 products in there Product 1 & Product 2 instead of just one Product 1
    CustomerID 1 should have Group 2 linked to Product 1 and CustomerID 2 should have Group 2 linked to Product1 & Product 2.


    tblProduct is linked with tblGroup. So every time I select/use Group 1 I will get the linked ProductID!

  12. #27
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You keep referencing your structure that isn't working. But should not be an issue with my suggested structure. Unless I really have zero understanding of these data relationships.

    An example of data entry for a new order:

    Main form bound to tblOrders.
    Combobox on main form to select customer.
    Subform bound to tblOrderDetails.
    Comboxboxes on subform to select product and group.

    Or can do 3 form levels.
    Main form bound to tblCustomers
    Subform bound to tblOrders
    SubSubform bound to tblOrderDetails.
    Comboboxes to select product and group.

    Customer combobox would use tblCustomers as RowSource.
    Product combobox would use tblProducts as RowSource.
    Group combobox would use tblGroups as RowSource.
    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.

  13. #28
    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,870
    Did you work through a tutorial from the link that June gave in post#2?
    I haven't seen OrderName ever, either.
    I recognize you are new to database and Access, and I would also suggest working through one of the tutorials.
    It is often better to identify the business facts, create a data model (entity relationship diagram), test the model with test data and scenarios; then, once all is working, build the database using you model as a blueprint.

    As for
    But how do I relate the Product with the Customer?
    Normally, Customer is related to Order and Product/Item is related to Order (often through OrderDetail).

    See this for more info
    Good luck.

  14. #29
    nycman is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2012
    Posts
    31
    Quote Originally Posted by ore;291455ang
    Did you work through a tutorial from the link that June gave in post#2?
    I really did! I even printed everything and read through it few times while going to work and back.

    Quote Originally Posted by ore;291455ang
    I haven't seen OrderName ever, either.

    I recognize you are new to database and Access, and I would also suggest working through one of the tutorials.
    It is often better to identify the business facts, create a data model (entity relationship diagram), test the model with test data and scenarios; then, once all is working, build the database using you model as a blueprint.
    Thank you, I'll start from the beginning since obviously I'm missing a lot.

    Quote Originally Posted by ore;291455ang
    As for

    Normally, Customer is related to Order and Product/Item is related to Order (often through OrderDetail).

    See this for more info
    Good luck.
    This was not supposed to be a Customer, Order, Product/Item database but I realize that I can find the similarities with that kind of database and start from scratch. I think I started this post wrong from the beginning. I also think that my mind was so focused to what I was envisioning that I was not able to understand what June7 was telling me.

  15. #30
    nycman is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2012
    Posts
    31
    Quote Originally Posted by June7 View Post
    You keep referencing your structure that isn't working. But should not be an issue with my suggested structure. Unless I really have zero understanding of these data relationships.
    June7,

    I apologize but it was not my intention to insult you and your knowledge of Access. It is just that sometimes "seeing" the picture is hard especially hard for beginners.

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Relationship Question
    By Collins in forum Database Design
    Replies: 6
    Last Post: 06-04-2015, 12:07 PM
  2. Replies: 4
    Last Post: 12-12-2012, 10:21 AM
  3. Replies: 5
    Last Post: 12-05-2012, 10:42 AM
  4. Relationship question
    By txlibertygirl in forum Access
    Replies: 2
    Last Post: 10-13-2011, 08:59 PM
  5. Relationship Question on one-many
    By daveofgv in forum Database Design
    Replies: 2
    Last Post: 05-08-2011, 10:39 AM

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