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

    Dlookup Assist

    Where's my syntax wrong?



    DLookUp("Netbase","Unit","[Units] =" & [TOE Title])


    Table 1 Data
    [TOE Title]

    Table 2 UnitData
    [Netbase]
    [Units]

    What my intentions are:
    Look up the [Netbase] column value in the table named Unit where the Data table [TOE Title] column value is the same as the Unit Table [Units] column value.

    I know [TOE Title] is not correct naming convention, but I didn't develop that structure. Its from an excel output from another database not under my control.

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    It depends on the data type of the field [TOE Title]

    If it is a text/memo/etc then you need quotes around it: "Units='" (single and double) & [TOE Title] & "'" (double/single/double) - translating into "Units='abc'")
    As you have it above {TOE Title] is a number
    For a date field it will be #

  3. #3
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    It was a string and it worked out I knew it had to do something with " and '

    MUCH Appreciated!

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

Similar Threads

  1. Some SQL beyond my abilities (please assist)
    By hellfire45 in forum Access
    Replies: 1
    Last Post: 03-18-2015, 07:00 AM
  2. Assist with results
    By GregRemaly in forum Queries
    Replies: 8
    Last Post: 10-08-2014, 12:45 PM
  3. Email doublespacing, vba assist
    By redbull in forum Programming
    Replies: 3
    Last Post: 03-18-2013, 01:58 PM
  4. Senseless, but please assist
    By djclntn in forum Queries
    Replies: 7
    Last Post: 11-21-2011, 07:02 PM
  5. **I need Help with EXCEL. Please Assist**
    By n in forum Import/Export Data
    Replies: 0
    Last Post: 06-23-2006, 10:08 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