locked
Access 2010 Date Bug ???? RRS feed

  • Question

  • I am using Access 2010 (64 bit) and found an obvious problem with the date function not returning the system date which you would expect to show in product testing.  Here are some commands executed in the Intermediate Window:

    ? date
    04/01/2011
    ? now()
    11/03/2012 11:38:03

    Can anyone else confirm it?

    I have been using 64 bit office and I have serious doubts about the quality of the Access product it includes.  Surely Microsoft should should describe it a beta version?  The other products such as Outlook, Word and Excel seem to work fine as far as I can tell.


    PG A bit of experimentation by trial and error often helps.

    Sunday, March 11, 2012 11:56 AM

Answers

  • Sorry, don't have Access x64 installed, so I can't test. Are you sure that you don't have some other Date function in your application?

    See whether this works any better:

    ?VBA.Date()

    As an aside, I'm curious as to why you installed the 64 bit version of Access. In actual fact, Microsoft doesn't recommend using it! (See Choose the 32-bit or 64-bit version of Microsoft Office, which explicitly states "The 32-bit version of Office 2010 is the recommended option for most people, because it prevents potential compatibility issues with other 32-bit applications, specifically third-party add-ins that are available only for 32-bit operating systems."). It may be of some use in some Office products, but Access isn't one of them!


    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)

    Sunday, March 11, 2012 12:08 PM
  • There is definitely no Date function in my Application.   But it does look like there may be another one on the PC somewhere ..... because:

                     ? VBA.Date() returns the correct date.


    The odds are good that this has nothing to do with the 64-bit-ness of your Access version.  Most likely is that you have a variable or control named "date" that is in scope.  What happens if you click on the word "date" in the immediate window and press Shift+F2 (View Definition)?  It may take you somewhere other than the VBA library, which would be a giveaway.

    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Monday, March 12, 2012 1:11 AM

All replies

  • Sorry, don't have Access x64 installed, so I can't test. Are you sure that you don't have some other Date function in your application?

    See whether this works any better:

    ?VBA.Date()

    As an aside, I'm curious as to why you installed the 64 bit version of Access. In actual fact, Microsoft doesn't recommend using it! (See Choose the 32-bit or 64-bit version of Microsoft Office, which explicitly states "The 32-bit version of Office 2010 is the recommended option for most people, because it prevents potential compatibility issues with other 32-bit applications, specifically third-party add-ins that are available only for 32-bit operating systems."). It may be of some use in some Office products, but Access isn't one of them!


    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)

    Sunday, March 11, 2012 12:08 PM
  • There is definitely no Date function in my Application.   But it does look like there may be another one on the PC somewhere ..... because:

                     ? VBA.Date() returns the correct date.

    The reason for using 64 bit office was I have Visual Studio subscription which gives me some downloads ... there was a choice between using 32 and 64 bit office.  So I thought I would give the 64 bit Office a try. 

    I think I may have to put this down to being a failed experiment and gove with goold old 32 bit office ....the 64 bit version of Access may be too unstable to make it a viable proposition. I have had a lot of problems in debug - database locked, multiple instances running - reverting back to VBA modules which are several hours out of date


    PG A bit of experimentation by trial and error often helps.

    Sunday, March 11, 2012 6:22 PM
  • There is definitely no Date function in my Application.   But it does look like there may be another one on the PC somewhere ..... because:

                     ? VBA.Date() returns the correct date.


    The odds are good that this has nothing to do with the 64-bit-ness of your Access version.  Most likely is that you have a variable or control named "date" that is in scope.  What happens if you click on the word "date" in the immediate window and press Shift+F2 (View Definition)?  It may take you somewhere other than the VBA library, which would be a giveaway.

    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Monday, March 12, 2012 1:11 AM
  • If I type in the immediate window, it returns 12/03/2012 which is correct.

    There are definitely no functions or procedures called "Date" in the application. But ......

    I have found there is a table with a column called Date - and there is a control on a form also called Date - so my guess is I have been picking up the wrong value from the control.  I have renamed the column and the control as Date must be a reserved word.

    If I press Shift + F2, (thats a new tip for me, thanks) it shows the Date method under the DateTime object ...


    PG A bit of experimentation by trial and error often helps.

    Monday, March 12, 2012 5:04 PM
  • Yes, Date is a reserved word.

    For a comprehensive list of names to avoid (as well as a link to a free utility to check your application for compliance), check what Allen Browne has at Problem names and reserved words in Access


    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)

    Monday, March 12, 2012 5:10 PM
  • Yes, Date is a reserved word.

    For a comprehensive list of names to avoid (as well as a link to a free utility to check your application for compliance), check what Allen Browne has at Problem names and reserved words in Access


    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)

    Monday, March 12, 2012 5:11 PM