Results 1 to 4 of 4
  1. #1
    kduschel is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    8

    Compile error after upgrading to 2016 (from 2010)

    I received the following error when I tried opening a form following an upgrade to 2016 from 2010. I'm very much self-taught with Access and would appreciate some help problem-solving this issue. Let me know what additional information may be needed to ponder this problem.



    Compile error. In query expression 'IIf([Contract_T]![Status]=1,DateDiff("d",[Rec'd_Request],Date()),0)'

    The purpose of the field is to track the aging of a contract in process.

    Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Start by checking if you have any BOGUS missing references. From the code window go to Tools>References If any are reported as MISSING just uncheck it and recompile and see if you still have the error.

  3. #3
    kduschel is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    8
    I'm not 100% sure I did what you said correctly, but I'm still having the issues. It feels like something is wrong with the DateDiff formula. If I take out the IIF portion and just do a straight DateDiff it says "the expression you entered contains invalid syntax". This is the same formula that worked in 2010. Could something have changed with the upgrade?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Maybe if we saw the whole SQL for the query.

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

Similar Threads

  1. Replies: 3
    Last Post: 05-12-2016, 07:06 PM
  2. Replies: 1
    Last Post: 04-18-2016, 01:33 PM
  3. Replies: 3
    Last Post: 06-27-2014, 01:09 AM
  4. Replies: 22
    Last Post: 02-24-2014, 10:21 PM
  5. Type mismatch Error after upgrading to Access 2010
    By twm07073 in forum Programming
    Replies: 7
    Last Post: 06-13-2012, 10:07 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