Results 1 to 2 of 2
  1. #1
    GregTheSquarePeg is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    16

    Dlookup in form

    Hi,



    I'm a bit of an Access novice (to say the least), but keen to learn as much as possible.

    I'm creating a very simple form, where a user enters a value, the value is then looked up in a large table and a 'SuppNo' is returned.

    Code:
    =DLookUp("SuppNo","dataCatExtract","[ISBN] = " & [Forms]![ISBNSearch]![ISBN])
    I put the above into the ControlSource field of a form text box. The 'ISBN' does exist in the table, and does have a corresponding 'SuppNo' - yet the above returns an error (#Error)

    Any help would be greatly appreciated.

    Gregg

  2. #2
    GregTheSquarePeg is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    16
    Cracked it:

    =DLookUp("[SuppNo]","dataCatExtract","[ISBN] =" & "[Forms]![ISBNSearch]![ISBN]")

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

Similar Threads

  1. Dlookup to find value on another form
    By burrina in forum Forms
    Replies: 16
    Last Post: 11-04-2012, 07:39 PM
  2. dlookup put the result in form
    By hamish mather in forum Programming
    Replies: 3
    Last Post: 01-05-2012, 03:10 PM
  3. Form title dlookup problem
    By zoinnk in forum Forms
    Replies: 3
    Last Post: 10-03-2011, 08:40 AM
  4. DLookup to populate form
    By OMGsh Y did I say Yes in forum Forms
    Replies: 2
    Last Post: 12-09-2010, 01:05 PM
  5. Form Dlookup macro
    By lukekelly in forum Forms
    Replies: 2
    Last Post: 01-20-2010, 06:24 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