Results 1 to 4 of 4
  1. #1
    Nanuaraq is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    77

    How to use Dlookup in design view of query

    The Access web's tutorial on dlookup inly provides advice on the VBA how-to. I can only use design view, so how would I create a dlookup in design view?
    I keep getting syntax errors.

    Alternatively, would someone be kind as to provie an example of such a query in SQL, then I could remake that and work from there?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    You could provide sample of data and desired result.

    Why do you need DLookup? Why not join tables?

    Type DLookup() function in a field cell of query design view.

    Duplicate https://www.accessforums.net/showthread.php?t=77697
    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.

  3. #3
    Nanuaraq is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    77
    It is duplicate because the other thread ran a bit wild with possible solutions, while in this case I specifically want to try out DLookup and see if it does what I need it to.

    From where I'm standing, I can't make even the simplest DLookup work. I simply do not know how to properly phrase it.

    For a test, I try this:

    I have a table, Table1.
    There is a column, Column1.
    In column1, row 1, there is a field with text "hello world".

    I have a query, Query1.
    In query1, I want to have DLookup return "Hello world".

    I am using design view. What should I enter into the generator?

    Thank you in advance.


    To put up an example, I try writing this in the generator in design view:

    Expr1: DLookUp([Column1];[Table1];[Id]=1)

    Under Expr1, I expect to see the content of Column1 in Table1 where the corresponding Id is 1 (namely the first row, where the words "Hello world" are).
    When I run the query, I am asked for a parameter value, then the resulting query tells me there is an error.

  4. #4
    Nanuaraq is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    77
    Quote Originally Posted by Nanuaraq View Post
    It is duplicate because the other thread ran a bit wild with possible solutions, while in this case I specifically want to try out DLookup and see if it does what I need it to.

    From where I'm standing, I can't make even the simplest DLookup work. I simply do not know how to properly phrase it.

    For a test, I try this:

    I have a table, Table1.
    There is a column, Column1.
    In column1, row 1, there is a field with text "hello world".

    I have a query, Query1.
    In query1, I want to have DLookup return "Hello world".

    I am using design view. What should I enter into the generator?

    Thank you in advance.


    To put up an example, I try writing this in the generator in design view:

    Expr1: DLookUp([Column1];[Table1];[Id]=1)

    Under Expr1, I expect to see the content of Column1 in Table1 where the corresponding Id is 1 (namely the first row, where the words "Hello world" are).
    When I run the query, I am asked for a parameter value, then the resulting query tells me there is an error.
    Nevermind, Youtube did it:
    https://www.youtube.com/watch?v=hUsHKvhKDh0

    And heres the expression that saved it:
    Expr1: DLookUp("Column1";"Table1";"[Id]=1")

    Just like that. Well, better get cracking, I need to see how this works in the project.

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

Similar Threads

  1. Replies: 10
    Last Post: 02-06-2018, 02:37 PM
  2. Export design view as a query?
    By securitywyrm in forum Access
    Replies: 1
    Last Post: 12-29-2017, 04:05 PM
  3. Query - Design View
    By Rick West in forum Queries
    Replies: 4
    Last Post: 04-09-2012, 04:09 PM
  4. Unable to view query in design view
    By vemi007 in forum Queries
    Replies: 7
    Last Post: 01-19-2012, 11:36 AM
  5. Using a Design View Query in ADO?
    By danny2000 in forum Access
    Replies: 4
    Last Post: 12-06-2010, 03:36 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