Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Apr 2003
    Thanked 0 Times in 0 Posts

    IIF function (2000)

    I am trying to create a report based off of one of my queries. We want to get a listing of all books in a certain charge code, along with the accompanying notes, but ONLY if the notes begin with "req. by". I have tried the following code in a text box:

    =IIf([NOTE1]="req*",[NOTE1]," ")

    and only get blanks in that field when I run the report. What am I doing wrong? Should I be doing this in the query instead of the report? I tried doing that and modifying the join properties such that I get ALL books, not just the ones that have accompanying notes. This wasn't working for me either.

    Thank you!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: IIF function (2000)

    You must use the Like operator if you want to use wildcards (* or ?):

    =IIf([NOTE1] Like "req*",[NOTE1]," ")

    You should be able to use this expression (without the initial =) in a query too.

Posting Permissions

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