none
Undefined function Date in expression RRS feed

  • Question

  • I have an error in this expression under Access 2016 which worked fine in Access 2007

    Assign Date
        'Me!TransactionDate = Date

    It gives me the following error: Undefined function "Date" in expression

    Can anybody help me?

    Tuesday, August 2, 2016 11:44 PM

Answers

  • Hi,

    >>Undefined function "Date" in expression


    Normally, there are three kinds of reasons.

    1)Doesn't refer to Microsoft DAO 3.6 Object Library.

    Solution: In the VBA Editor viewing the code, select Tools -> References, select Microsoft DAO 3.6 Object Library.


    2)doesn’t refer to OLE Automation.

    Solution: In the VBA Editor viewing the code, select Tools -> References, select OLE Automation. 


    3)doesn’t registry DAO

    Solution: 

    Close Microsoft Access

    Press Windows key + R to open Run dialog box

    If you are using 32bit OS, input regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll"

    If you are using 64bit OS, input regsvr32 "C:\Program Files (x86)\common files\Microsoft Shared\DAO\dao360.dll"


    Wednesday, August 3, 2016 6:22 AM
    Moderator

All replies

  • Hi. Double check your References and see if there's any marked "MISSING."
    Wednesday, August 3, 2016 12:37 AM
  • Hi,

    >>Undefined function "Date" in expression


    Normally, there are three kinds of reasons.

    1)Doesn't refer to Microsoft DAO 3.6 Object Library.

    Solution: In the VBA Editor viewing the code, select Tools -> References, select Microsoft DAO 3.6 Object Library.


    2)doesn’t refer to OLE Automation.

    Solution: In the VBA Editor viewing the code, select Tools -> References, select OLE Automation. 


    3)doesn’t registry DAO

    Solution: 

    Close Microsoft Access

    Press Windows key + R to open Run dialog box

    If you are using 32bit OS, input regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll"

    If you are using 64bit OS, input regsvr32 "C:\Program Files (x86)\common files\Microsoft Shared\DAO\dao360.dll"


    Wednesday, August 3, 2016 6:22 AM
    Moderator