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

    Author codes (97)

    arage
    Member posted 02-19-2002 06:24 PM
    --------------------------------------------------------------------------------
    i typed the following expression to help me find out what authors i needed to create an author code for. However when i run my query, the expression always shows NO even for records I know the [Notes] fields contains a valid [AuthorCode] for. Please advise.
    IIf(DLookUp("[Authors]![AuthorCode]","[Authors]",[Authors]![First Name] & " " & [Authors]![Last Name]=[Reviews]![Notes]),"Yes","No")

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

    Re: Author codes (97)

    Your syntax got mangled on DLookup. It is Dlookup(<fieldname>,<domain>,<criteria>). You don't reference the domain in the fieldname or criteria portions, you just use the field name. The entire critieria portion is a string, like "[FieldName] = " & Whatever. Try this:

    <pre>Dlookup("[AuthorCode]","Authors","[FirstName] & ' ' & [LastName]='" & [Reviews]![Notes] & "'")</pre>

    Charlotte

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

    Re: Author codes (97)

    thank you oh so very much! it worked beautifully!

Posting Permissions

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