Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Location
    London
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date functions (97)

    All of a sudden my version of Access does not seem to recognise date functions such as Date() in queries tables etc. I've had this problem before and I think I resolved it by reinstalling Access. However I would like to avoid this if at all possible. Can anyone help?

    thanks in advance

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Date functions (97)

    Hi,
    This sort of thing is quite commonly caused by missing references. If you open up a module and in the VBEditor select Tools-References from the menu, is anything with a tick next to it shown as 'MISSING:' followed by its name? If so, try unchecking it, compiling your database and see if that cures the problem.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    New Lounger
    Join Date
    Nov 2001
    Location
    London
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date functions (97)

    Rory,

    Thanks for that. I've looked at the references and there is nothing missing. I have references to Visual Basic For Applications, Microsoft Access 8.0 Object Library and Microsoft DAO 3.51 Object Library - they are all ticked and present.

    All my code is working fine, it is just any queries and tables using date functions.

    Do you have any other ideas?

    Thanks in advance

    Amanda

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Date functions (97)

    Amanda,
    A couple of questions to try and narrow it down:
    Does this happen in all your databases?
    What is the error you're getting?
    Can you give an example? (does it happen if you just use =Date()?)
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    New Lounger
    Join Date
    Nov 2001
    Location
    London
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date functions (97)

    Rory,

    The error only occurs in this one database file.
    An example of the error is :-
    "Function isn't available in expressions in query expression '(((GroupData.UpDate)>Date()-30))' "
    This is just one example of when I use Date()

    Thanks

    Amanda

  6. #6
    New Lounger
    Join Date
    Nov 2001
    Location
    London
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date functions (97)

    Rory,

    On having a further look, this error only happens on some of my databases, not all of them! I can't think what the common link is between them.

    When I change the date() function for Now() the query runs no problem.

    As such this has fixed it, but if you have an explanation I would be really grateful.

    Thanks yet again

    Amanda

  7. #7
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date functions (97)

    Try importing all the objects from this database into a new blank database and see if this solves your problem. That would be easier than having to reinstall Access.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

Posting Permissions

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