Results 1 to 10 of 10
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Brandon, Manitoba, Canada
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Missing date function (Access 2K)

    For years I have been using the date function i.e. date() in my access databases, and suddenly it won't recognize it, giving me the message "enter paramater value ... date". Checking the references Ihave the following listed:
    Visual Basic for Applications
    Microsoft Access 9.0 for applications
    OLE Automation
    Microsoft Visual Basic for Applications Extensibility 5.3
    Microsoft DAO 3.6 object library
    Utility

    What am I missing?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Missing date function (Access 2K)

    That sort of message almost always indicates a missing reference of some sort. I presume you don't have missing for any of the references listed, but are you by chance using Word, Excel or Outlook since you have OLE Automation referenced?
    Wendell

  3. #3
    Star Lounger
    Join Date
    Jan 2001
    Location
    Brandon, Manitoba, Canada
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Missing date function (Access 2K)

    I often do integrate both excel and word into my work, sending access reports to either, merging docs, etc. I also have Missing:utility, but selecting it and browsing to the location (1033 directory), will fix the "missing" but seems only temporarily, and doesn't seem to help my reference problem. Why is it being listed as missing when the file is there? Might accessing from different computers cause this? The utility.mda is located on each computer. Does the utility.mda contain the reference I need? is Date() not a VBA function?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Missing date function (Access 2K)

    Date is a standard VBA function, but any missing reference will cause VBA not to recognize standard functions such as Date, Left etc. any more.

    Do you really need the reference to Utility.mda? Try clearing this reference altogether and see if the problem goes away.

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Missing date function (Access 2K)

    As Hans indicates, any missing reference tends to cause VBA functions to fail, though the symptoms often vary in terms of what fails and what doesn't. We deploy an MDA file with many of our applications, and insist that it be put into a common folder on each workstation, usually on the local C: drive in a root level folder.
    Wendell

  6. #6
    New Lounger
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Missing date function (Access 2K)

    Greetings, my first post!

    I also have a problem with the Date function--it just says it's NULL when I try to use it. No apparent missing references. I have:

    Visual Basic for Applications
    Microsoft Access 9.0 Object Library
    OLE Automation
    Microsoft ActiveX Data Objects 2.1 Library
    Microsoft DAO 3.6 Object Library

    Access 2K on WinXP.

    Is my problem the same or different??
    kcm549

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Missing date function (Access 2K)

    Welcome to Woody's Lounge!

    Check very carefully if you have a field in a table or query named Date, or a global variable in VBA named Date, or if the problem occurs on a form or report, if it contains a control named Date.

  8. #8
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Missing date function (Access 2K)

    Welcome to the Lounge and to the Access forum - we hope your visit is fruitful.

    I presume you are trying to use it in VBA - if that's the case you don't need to reference it as a function - just use the word Date. If on the other hand you are trying to use it in a SQL string (a query), then you should use it like this: Date(). If you are still getting a NULL returned, try the Now() function and see if it gives you the date and the time. Let us know if this solves the problem.
    Wendell

  9. #9
    New Lounger
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Missing date function (Access 2K)

    Interesting...
    Thanks for your quick responses both Wendell AND Hans!
    I DID have a FIELD named "Date," and so I changed the name of it to eliminate confusion. However that only produced a different error. Then, per Wendell's suggestion, I used the Now function and that was recognized.

    Why does it recognize Now and not Date I wonder?
    kcm549

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Missing date function (Access 2K)

    Apparently, the name Date still confuses Access. Without seeing the database it's hard to say what exactly causes this. If you wish, you can post a stripped down copy of your database so that Loungers can investigate the problem; see <post#=401925>post 401925</post#> for instructions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •