Results 1 to 5 of 5
  1. #1
    dadas is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    4

    please help urgent...thanks

    hi everyone,
    i am in the process of building a database. Its almost complete but one of the last things ive been asked to do is giving me the most trouble. I am by no means an expert at access or databases. Ive had a class on it in school and that is the extent of my knowledge besides a few other things ive taught myself.
    Basically in my database i have a client table. Each client has certain products they use. I currently have a products field in my clients table with a lookup to a products table. This is done through a combo box where you can select the desired products. I have it on a form and everything is working. here is where my problem is. Now i want on my form to be able to go to a client then select a product associated with him(one of the products selected in the combo box) and have a list box display all the vendors associated with that product.



    just because a productA is used by 2 different clients that doesnt mean they both use the same vendors for that product.

    I hope this makes sense. And i hope its a somewhat easy thing that one of u can explain to me. THANKS!

  2. #2
    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,848
    THere is a data model at this iste that might help
    http://www.databaseanswers.org/data_...ders/index.htm

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Are you using a multi value field in your table? If you are, don't, it's going to cause you no end of aggravation and makes the type of thing you're talking about much more difficult than it needs to be.

  4. #4
    dadas is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    4
    ok thatnks for the heads up. how would u suggest i do this then? i want to be able to select multiple products from the product table and then click a vendor to associate withe each one

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    any one to many relationship is going to require two tables

    1 that stores the basic information (for instance in a purchase order situation you would have the purchase order number, the vendor, the order date, etc) this field should have a unique key field (autonumber is fine)
    1 that stores the detail this table would have to have its' own unique key field (again autonumber works fine) and the unique key from the basic information table as the foreign key. Then you would have the item ordered. Every item you enter in the detail would logically then, have been ordered from the vendor in the 'main' table.

    I don't know exactly what's going on in your situation, it should be irrelevant to your customers who the supplier is but this is the basic idea you would follow.

    One to many relationships require 2 tables not 1.

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

Similar Threads

  1. Urgent help needed on forms
    By syedalisajjad in forum Forms
    Replies: 9
    Last Post: 11-04-2011, 10:37 PM
  2. Query help urgent
    By IKNOWNOSQL in forum Queries
    Replies: 1
    Last Post: 06-29-2011, 05:15 AM
  3. Urgent Query Help Please
    By AccessFreak in forum Queries
    Replies: 1
    Last Post: 06-23-2011, 06:02 AM
  4. Concatenation Urgent Help
    By Shoaib in forum Queries
    Replies: 0
    Last Post: 04-23-2009, 11:02 PM
  5. I need help! Urgent! :(
    By Suzan in forum Database Design
    Replies: 0
    Last Post: 04-08-2006, 11:58 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