none
How do I fix - compile error. in query expression 'Date('.

    Question

  • Error window pop-up with this error 'compile error. in query expression 'Date('.' when I run the following Access query.

    UPDATE ChangeRequest INNER JOIN CAFM_NDL_ChangedFloors ON ChangeRequest.ID = CAFM_NDL_ChangedFloors.ChngRqst_ID SET ChangeRequest.[CAFM Completed] = Date() WHERE (((ChangeRequest.[CAFM Completed]) Is Null));

    It was running fine but all of a sudden today just keep poping-up this error.

    Joe

    Thursday, September 13, 2012 4:57 PM

Answers

  • Press Alt+F11 to activate the Visual Basic Editor.

    Select Tools | References...

    You'll see a list of references; the ones in use are listed at the top, with their check boxes ticked.

    Do you see one or more references among those in use whose name starts with MISSING: ?

    If so, clear their check boxes.

    Click OK.

    Select Tools | Compile <projectname>.

    If you don't get an error message, you should be OK now; you can close the Visual Basic Editor and try to run the query.


    Regards, Hans Vogelaar

    Thursday, September 13, 2012 7:01 PM

All replies

  • Check that you don't have any issues with your References collection. Go into the VB Editor and select Tools
    | References from the menu. Make sure none of the selected references (the ones with check marks at the top of the list) have MISSING: in front of their name.

    Doug Steele, Microsoft Access MVP
    http://www.AccessMVP.com/djsteele (no e-mails, please!)
    Co-author Access Solutions — Tips, Tricks, and Secrets from Microsoft Access MVPs (ISBN 978-0-470-59168-0)

    Thursday, September 13, 2012 6:56 PM
  • This error could be caused by a bunch of things.  Maybe there is an invalid Date value,  -- less likely, but maybe there was a table name change or the tables became unjoined (by accident while viewing table relationships).


    Rich P

    Thursday, September 13, 2012 6:56 PM
  • Press Alt+F11 to activate the Visual Basic Editor.

    Select Tools | References...

    You'll see a list of references; the ones in use are listed at the top, with their check boxes ticked.

    Do you see one or more references among those in use whose name starts with MISSING: ?

    If so, clear their check boxes.

    Click OK.

    Select Tools | Compile <projectname>.

    If you don't get an error message, you should be OK now; you can close the Visual Basic Editor and try to run the query.


    Regards, Hans Vogelaar

    Thursday, September 13, 2012 7:01 PM
  • Hi Joe,

    Thanks for posting in the MSDN Forum.

    I will mark Hans's reply as answer, please feel free to unmark it if you don't think so.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 19, 2012 7:29 AM
    Moderator
  • Hi Hans,

    If I don't have anything in tool-->references that starts with MISSING, how else can I address this error?  Get compile error for all date, age, weekday, etc., calculations when going from 32 bit system to 64 bit system.

    Thank you!

    Monday, March 12, 2018 5:08 PM
  • Do you have 64-bit Windows (shouldn't cause any problems) or 64-bit Office (may require some changes to your code)?

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Monday, March 12, 2018 8:07 PM