Results 1 to 3 of 3
  1. #1
    yoili is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    4

    IIF with instr

    would like to make an expression in an Access report, that if the field contains a space and the word "is" it should return one text and if it doesn't contain it should return another text.

    I'm using =iif(instr(" is",[field_name])=0,"OK","not OK")



    and it is not working it is always returning Not ok

    Thanks for your help

  2. #2
    Amicron's Avatar
    Amicron is offline Access Guru
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Amherst, New York (near Buffalo)
    Posts
    31
    You've got your parameters backwards. It should be: instr([FieldName]," is")
    Richard Rost
    President/CEO
    AccessLearningZone.com

    P.S. Be sure to stop by my web site for free tutorials, tips, tricks, and lots more.

  3. #3
    yoili is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    4
    Thanks!!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. InStr Parameter in Report Title
    By Huddle in forum Reports
    Replies: 4
    Last Post: 12-04-2012, 02:31 PM
  2. Using InStr() inside Mid()
    By urbi in forum Programming
    Replies: 12
    Last Post: 06-06-2012, 12:00 PM
  3. Data Seperation by InStr()
    By A S MANN in forum Queries
    Replies: 3
    Last Post: 10-20-2011, 03:47 AM
  4. InStr and Mid code creating type mismatch
    By sephiroth2906 in forum Programming
    Replies: 6
    Last Post: 09-15-2011, 10:59 AM
  5. INSTR(), quick little syntax ?
    By markjkubicki in forum Forms
    Replies: 2
    Last Post: 11-15-2010, 02:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums