Results 1 to 4 of 4
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839

    Dlookup Quotation Marks

    I'm using:
    DLookUp("[STRField1]","[Table1]","[
    NumField1
    ]='" & [NumField1] & "' AND [
    NumField2
    ] ='" & [
    NumField2]
    & "'") with no issues

    I am trying to add:

    [NumField3] = 1 - I keep getting data error



    DLookUp("[STRField1]","[Table1]","[NumField1]='" & [NumField1] & "' AND [NumField2] ='" & [NumField2] & "' And
    [NumField3] =1'")

    Its this part
    =1'" where I am screwing up


    Thanks


  2. #2
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Have a look at the links in my signature, that should help you.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    That is 1 too many apostrophes, unless NumField3 is a text type field then there is 1 too few.

    Quotes, apostrophes, # characters, parens, and brackets must always be in pairs.
    Last edited by June7; 01-14-2019 at 05:41 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    Thanks - It helped, but didn't wotk out the way I wanted.

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

Similar Threads

  1. InStr() and quotation marks
    By Puebles in forum Programming
    Replies: 3
    Last Post: 11-22-2013, 07:36 AM
  2. Replies: 2
    Last Post: 04-17-2013, 04:59 AM
  3. Including Quotation Marks in SQL Server Views
    By EddieN1 in forum SQL Server
    Replies: 0
    Last Post: 02-17-2013, 07:32 PM
  4. Concatenate Quotation Marks
    By millerdav99 in forum Programming
    Replies: 3
    Last Post: 04-11-2011, 09:36 AM
  5. Transferring text within quotation marks
    By Lynette in forum Access
    Replies: 6
    Last Post: 11-24-2010, 11:58 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