Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to specify dlookup domain in expression builde (97)

    how to specify dlookup domain in expression builder
    how would you write the DOMAIN argument of the dlookup function when you are in the expression builder?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: how to specify dlookup domain in expression builde (97)

    Highlight the phrase and type in the correct argument.
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to specify dlookup domain in expression builde (97)

    Actually something like this isn

  4. #4
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to specify dlookup domain in expression builde (97)

    well here

  5. #5
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to specify dlookup domain in expression builde (97)

    I suspect it should be more like
    DLookUp("refNum","NewQuery","[refNum]<>[NewQuery]![ReferenceNumber]")

    Using <> will most likely just give you the first refNum in the table each time though!

    Peter

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: how to specify dlookup domain in expression builde (97)

    It won't work in the criteria because it doesn't know what the value of [NewQuery]![ReferenceNumber] is. You use doman aggregates like that to create a calculated field in a query, not to act as criteria.

    What you can do is use a dlookup in a calculated field (drop the NewQuery! part of it and include the <> inside the quotes, then use an ampersand between that and the field reference). Then in the criteria line under that expression, put Is Not Null as the criteria. That will give you the records where the dlookup result returns a value that does not match the referencenumber field. Unfortunately, I can't say that the dlookup makes sense to me, since it's going to return the first value it finds that isn't equal to ReferenceNumber, and I'm not sure what that gets you. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

Posting Permissions

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