Results 1 to 2 of 2
  1. #1
    Jim Pap is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    1

    Expressions in DLookUp

    I am having a problem with DLookUp. What I want to do is to look at a particular field in a table and return the corresponding value in the criteria section. My DLookUp works perfectly and looks like this;



    =DLookUp([80],"Products",[Pronto]=[Product])

    So the expression looks at the column labelled 80 in my Products table and returns the value in the Pronto column = to the value specified in the Product field. However, what I want to do is to substitute [80] with a field in a query called [Sell Code] so that it looks at the value in this field to define which column to select in the table and return the value based on the criteria, i.e.

    =DLookUp([Sell Code],"Products",[Pronto]=[Product])

    When I do this, it returns the value that is in the Sell Code field only. Anyone with any suggestions?

    See attachment for explanation.
    Attached Files Attached Files

  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,740

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

Similar Threads

  1. Header expressions?
    By brownk in forum Reports
    Replies: 1
    Last Post: 05-15-2012, 12:12 PM
  2. Queries, Look-up, and Expressions
    By Atlascycle in forum Queries
    Replies: 22
    Last Post: 02-28-2012, 06:40 AM
  3. implement expressions
    By quandore in forum Access
    Replies: 7
    Last Post: 01-11-2012, 03:48 AM
  4. Query Expressions
    By Andrea in forum Queries
    Replies: 6
    Last Post: 03-03-2011, 03:57 PM
  5. Nested If Expressions
    By Lynn in forum Forms
    Replies: 5
    Last Post: 03-25-2010, 10:11 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