Date Problems With MS Access 2007 Runtime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Andy Briggs
    New Member
    • Dec 2010
    • 2

    Date Problems With MS Access 2007 Runtime

    Hello all,

    I have a problem with distributing an Access 2007 application with the latest version of Access 2007 Runtime.

    What is happening that a date field on a form, whose default value is set to today's date using =Date() is not working. Nothing appears in the field for a new record (nor any error). I have tried setting its value from VBA for a new record, using the form's OnCurrent event, but that does not work either.

    I have tried using =Now() and =DateValue(Now( )) instead, but neither worked.

    The field behaves perfectly before packaging the database. Therefore the error is in the Runtime environment somewhere.

    Failure of date functions in Access is highly indicative of a broken reference. However, in the case of this database, there are no broken references. The only references being used are VBA, the Access 12.0 object library, the Excel 12.0 object library and the OLE Automation Library. None of these is showing as "Missing". There are no other "Missing" references in the References list. I did not expect any though, as the database works perfectly before packaging. I have deselected the Excel and OLE Automation references and tested - no difference.

    To make matters worse, the problem only appears on *some machines*. The others are fine. All machines are running Win XP. I suspect some DLL version difference somewhere, but have no idea which DLL might be causing the error.

    This error has been experienced by other people, if one searches the web, but it appears that no satisfactory nor universal solution has been found.

    Does anybody have any ideas about a solution for this problem?

    Many thanks

    Andy.
  • repath
    New Member
    • Dec 2009
    • 14

    #2
    Hello Andy Briggs,
    if you are using any database then, the following solution works well.
    In the table (from which you are populating values into the form), create a date column (with some temp name like jdate or dDate or the like) and put the Date value in the table with the above said functions like NOW() or DATE().
    Now update this value from table to the respective field on the Form.

    I hope this will solve your problem.

    With Regards
    Repath Athyala.

    Comment

    • Andy Briggs
      New Member
      • Dec 2010
      • 2

      #3
      Hi Repath,

      Many thanks for your reply - it is much appreciated. Your solution sounds logical and I shall certainly try it when I am back at work next week.

      Do you have any idea why exactly this error occurs in the first place, or what might be different on the affected machines to cause this error? I'm asking just in case there is anything I can do in the future to stop this error occurring (like distributing a particular version of a DLL, for example).

      Thanks again and a very happy new year to you

      Andy.

      Comment

      Working...