Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Apr 2010
    Location
    Sofia
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I want to look up in the table products and find the code but only for those products where the supplier id is 2. My working function is :
    =DLookUp("grossprice";"products";"Code=" & [Code])
    How can i attach this condition?

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Is this what you want?

    =DLookUp("Code";"products";"[Supplier ID]=2")

    But are there lots of products where the Supplier ID =2? If so, this will just return the first one.

    If there are many products a query would return the list...but what do you then want to do with them?

    Or are you wanting to add SupplierID to you existing Price lookup, as a second condition?
    Regards
    John



  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post
    John's right, this will only return the first record.

    What do you want to do with the results of the lookup?

    eg do you want to modify a field in the products table for each one?

    The answer to this will help up give you a better answer.

Posting Permissions

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