Results 1 to 2 of 2
  1. #1
    sergi117 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2018
    Posts
    30

    DLookup Multiple Criteria


    I'm doing a Dlookup which that the column data to the left of my table matches all the data from the table it is searching through and return the corresponding number. I've written it up as so: Vac: DLookUp("VAC","CALC","[CALC].[AL Corr Std Hours] = " & [Example].[AL Corr Std Hours] & "' And [CALC].[FLSA OT] = " & [Example].[FLSA OT] & "'")
    Yet I seem to get a syntax error (missingoperator). Can anybody let me know what the issue is? Thanks!

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Are the criteria values numeric? If so, the single quotes may be the problem

    DLookUp("VAC","CALC","[CALC].[AL Corr Std Hours] = " & [Example].[AL Corr Std Hours] & "' And [CALC].[FLSA OT] = " & [Example].[FLSA OT] & "'")

    EDIT - forgot to mention that the first one shouldn't enclose the AND operator regardless. So regardless if the values are text or numeric, the quotation placements are incorrect. Let us know what the value types are if you need more help.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. DLookup with multiple criteria
    By amai in forum Access
    Replies: 2
    Last Post: 12-20-2015, 02:10 PM
  2. Help with multiple criteria DLookup
    By jtm013 in forum Programming
    Replies: 7
    Last Post: 04-23-2015, 03:16 PM
  3. DLookup with multiple criteria
    By RunTime91 in forum Access
    Replies: 4
    Last Post: 02-08-2015, 08:28 PM
  4. Using DLookup with multiple criteria
    By halt4814 in forum Access
    Replies: 2
    Last Post: 04-08-2013, 12:26 PM
  5. Multiple criteria in DLookup
    By crowegreg in forum Forms
    Replies: 7
    Last Post: 06-22-2011, 01:47 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