Results 1 to 5 of 5
  1. #1
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25

    DLookup Error

    Does anyone know why the following does not work in a form textbox?

    =DLookUp("[Northing]","tblVWPs","[LocationID]=' " & [Forms]![frmVWPChart]![Combo46] & " ' ")

    tblVWP includes columns with LocationID and Northing.


    Combo46 is linked to select LocationID from tblVWPs.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    5,008
    Generally with me an ID is Long?
    So NO surrounding with single quotes. That is for strings.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Also, this would be more efficient if it's what you're trying to do:

    http://www.baldyweb.com/Autofill.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    Quote Originally Posted by pbaldy View Post
    Also, this would be more efficient if it's what you're trying to do:

    http://www.baldyweb.com/Autofill.htm
    Thanks, this version worked.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Dlookup Error
    By Punith Shetty in forum Forms
    Replies: 1
    Last Post: 03-10-2023, 02:27 AM
  2. dlookup error
    By slimjen in forum Forms
    Replies: 6
    Last Post: 07-15-2016, 07:57 AM
  3. Replies: 2
    Last Post: 01-04-2016, 09:40 AM
  4. DLookup error
    By Nadine67 in forum Access
    Replies: 12
    Last Post: 07-14-2015, 02:51 PM
  5. DLookup error
    By jgelpi16 in forum Programming
    Replies: 3
    Last Post: 08-25-2010, 07:26 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