Results 1 to 3 of 3
  1. #1
    catat is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    17

    Query - Lookup help


    Hello,

    I have two tables (one is salesperson and the other is customer). When using a form, I am trying to figure out how to select one salesperson and in the next field, have a selection of customers only linked to this one salesperson (this would be through a lookup field - combo box). At the moment, I can only get ALL of the customers. I am unsure of what formulas to use within the query. I believe I do have all of the relationships set up correctly.

    Thank you in advance!

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931

    lookup

    In this sample database I have Three tables.

    customers{customeID,customeName, details}
    salesmanDetails{salesID, salesmanName}
    products{productID, products}
    salesdetails{salesentry, customerID, salesmanID, productsID}

    I don't know your table structure but I assume that you want to lookup all the customers that a salesman had made sales to.

    This are some entries that I have made in salesdetails

    salesentryid salesmanName customerName products
    1 Micheal Cynthia Deo
    2 Micheal Loretta Hair Gel
    4 Roger Linda Hair Gel
    5 Roger June Deo

    Now open look_up Form Select Salesman and Customer. Now if you select Micheal in Salesman Combo Customer Combo should show Cynthia and Loretta.

    The Row Source for the Customer Combo Box is salesdetails and customers.In the criteria of cutomerId I typed the following expression.
    [Forms]![lookup_form]![Combo0]

    Follow this example mark the thread solved if you are able to solve your problem.

  3. #3
    catat is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    17
    I have yet to get it to work with my database, but it does solve my question. I was playing around in another database and I did get it to work with that one. I am beginning to think I have set up my tables incorrectly.

    Thank you very much!

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

Similar Threads

  1. Lookup Tables
    By corinthianw in forum Access
    Replies: 1
    Last Post: 02-17-2010, 01:31 PM
  2. Lookup Values
    By jbarrum in forum Access
    Replies: 6
    Last Post: 12-31-2009, 08:58 AM
  3. Many To Many lookup
    By todavy in forum Forms
    Replies: 0
    Last Post: 12-15-2009, 09:27 AM
  4. Replies: 1
    Last Post: 07-06-2007, 08:27 AM
  5. Lookup
    By neon'00 in forum Forms
    Replies: 2
    Last Post: 04-14-2007, 01:19 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