Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    361

    Unanswered: Function with * in it.

    IIf([Body2]="996*","911"

    If Body2 contains numbers like 996110 and 996310 will this function see those numbers and return 911?

  2. #2
    Join Date
    Apr 2004
    Posts
    41

    IIF(left(str([Body2]),3) = "996", "911", "")

    I hope I typed it right, but you get the idea.

  3. #3
    Join Date
    Oct 2003
    Posts
    66
    Quote Originally Posted by tjarvas
    IIf([Body2]="996*","911"

    If Body2 contains numbers like 996110 and 996310 will this function see those numbers and return 911?
    I think you might need the LIKE operator to use a wildcard comparison.
    You want all body2's that start with 996 right>?

    Try this

    iif([Body2] like "996*","911")

  4. #4
    Join Date
    Mar 2004
    Posts
    361
    For some reason I am getting a #Error with all the fields that contain 996110 or 996310 or etc etc.

    This is the function I have writen

    Type32: IIf(Left(Str([Body2]),3)="996","911","")

  5. #5
    Join Date
    Apr 2004
    Location
    Sydney Australia
    Posts
    369
    This works for me

    Premiums: IIf([Payment Mode] Like "H*",[Reg Premium]*2,IIf([Payment Mode] Like "Q*",[Reg Premium]*4,IIf([Payment Mode] Like "Y*",[Reg Premium]*1,IIf([Payment Mode] Like "M*",[Reg Premium]*12))))

  6. #6
    Join Date
    Mar 2004
    Posts
    361
    Sweet, thanks a ton!

Posting Permissions

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