Results 1 to 15 of 15
  1. #1
    GregatUNCG is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    7

    IIF issue with Access in Office 10

    Hi Everyone,



    I'm wanting to yank my hair out. I am having an issue in Access (Office 10) that I never had in prior versions, and I am not a newbie with Access. In this version of Access, my IIF statements are not working. No matter what I do, I get "The expression you entered contains invalid syntax. You omitted an operand......"

    The thing is if I do the function in any prior versions of Access it works fine. Additionally all the databases that I have from prior versions show the error in queries that have an IIF statement, but they WILL execute as long as I don't view the query.

    This statement below is an example....it doesn't get much simpler than this.

    FTPT: iff([TblA]#[RegHours]>5,"FT","PT")

    Has anyone else had this problem in Office 10?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    I don't have Acc2010, but I don't understand what your expression means.

    What is it in plain English? What is the "#"?

    Also immediate if is IIF.

  3. #3
    GregatUNCG is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    7
    I should have just cut and pasted instead of relying on my fat fingers lol

    the # of course should be !, and yep, I typed iff insted of iif


    The statement is just an example, I have the error in all my IIF statements in Access 10.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Try this Period not !
    FTPT: iff([TblA].[RegHours]>5,"FT","PT")

  5. #5
    GregatUNCG is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    7
    I have tried the "." I've used the build gui, I've tried flat typing, I've tried cut and past from working queries in past versions. I've re-installed Office, loaded all the updates and patches. I'm at my wits end.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Can you give/show a specific example? Full SQL for the query invovled.
    Also, and I'm sure you've tried this, be sure that the field(s) in your iif(..) are all spelled correctly, and they really exist in your table(s).

    I haven't seen posts suggesting a systematic error.

  7. #7
    GregatUNCG is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    7
    Orange, I have over 300 databases. This error occurs in every single one of them when I try to do it in Access 2010. Its not syntax. What adds to my frustration is that if I run a query that was created in a prior version of Access, the IIF processes correctly. If I look at the query in design mode, that error pops up and the query won't work again.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    As I said, I don't have Acc2010, and I haven't seen that specific issue reported elsewhere. It sounds like something specific to your install???
    Does it happen with users of these databases? Or on all machines??

    Not much help I'm afraid.

  9. #9
    GregatUNCG is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    7
    Only me thus far, but I do have a number of distributed apps and the users are running it fine, however they do not open the queries. I've re-registered acedao.dll, and that didn't help. Also as mentioned I reinstalled the entire Office package and that did nothing.

  10. #10
    GregatUNCG is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    7
    I just stumbled across the answer, and its one of those "omg you have got to be kidding me" issues. In the regional settings in the control panel, the list separator was not a comma. I've been dealing with this since February. Unbelievable.

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Glad you got it resolved.

  12. #12
    GregatUNCG is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    7
    Thanks for the help, Orange. Now I just need to talk to a Microsoft Engineer and ask what the HELL are they thinking!

  13. #13
    jrollins is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    2
    Quote Originally Posted by orange View Post
    Try this Period not !
    FTPT: iff([TblA].[RegHours]>5,"FT","PT")

    When doing "IF" statements use IIF not iff (you still have two "ff's)... remember it's "Is IF" = "IIF"

  14. #14
    jrollins is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    2

    Removed as duplicated from my earlier reply

    Removed as duplicated from my earlier reply

    When doing "IF" statements use IIF not iff (you still have two "ff's)... remember it's "Is IF" = "IIF"
    Last edited by jrollins; 09-26-2012 at 01:29 PM. Reason: Removed as duplicated from my earlier reply

  15. #15
    peterr89 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2012
    Posts
    3
    This error occurs in every single one of them when I try to do it in Access 2010
    Last edited by peterr89; 10-03-2012 at 12:07 PM.

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

Similar Threads

  1. Mixing Access 2000 with Office 2010
    By fiveoaks in forum Access
    Replies: 3
    Last Post: 10-20-2011, 09:59 AM
  2. Office 2007 Package Solution Issue
    By gavinjb in forum Access
    Replies: 0
    Last Post: 08-24-2011, 08:19 AM
  3. Replies: 1
    Last Post: 08-02-2011, 06:49 AM
  4. Office versions with Access 2007
    By Coolpapabell in forum Access
    Replies: 0
    Last Post: 09-29-2009, 09:37 AM
  5. Access 97 compatable with Office 2007??
    By mkattengell in forum Access
    Replies: 1
    Last Post: 09-08-2009, 04:24 AM

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