Results 1 to 5 of 5

Thread: dlookup problem

  1. #1
    Join Date
    Dec 2013
    Posts
    3

    Unanswered: dlookup problem

    I have the following two dlookups for retrieving a file location stored in table.

    LFPath = DLookup("LFLocation", "UserPref", "1")
    CRPath = DLookup("CRLocation", "UserPref", "1")

    Top one works fine here and elsewhere in another module. The second returns the error about the expression you entered as a query parameter produced this error: CRLocation.

    I've checked the table and both locations are the same data types and the CRLocation is spelled correctly. Any ideas.

    Forgive if double posted.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    No problem with a double post...

    New users posts are sometimes moderated by a third party product that we use to manage spam attacks... A message appears when you create a post saying that it has been moderated and that you'll need to wait for moderator approval, but very few if any users seem to notice that message.

    See the documentation for DLookup() You need to change how the third parameter is expressed, since "1" probably doesn't make sense in this case!

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Dec 2013
    Posts
    3
    Yeah, i saw the moderator pop up but then it went away before i could finish reading it. no worries


    However, in my pasting from somewhere else my dlookup didn't include, but, I did have the criteria set to "UserID =1", not just "1".

  4. #4
    Join Date
    Dec 2013
    Posts
    3
    DOh!

    Earlier in the day I had added the CRLocation column as an after thought but had not re-linked my table to reflect the change.

    Thanks for help anyways. Long time lurker since new to Access, as in last week new. :-)

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    No problem!

    Glad to have you aboard, and happy that you've found what it takes to make it work.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •