Results 1 to 4 of 4
  1. #1
    shylock is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Sep 2018
    Location
    Dayton, Ohio
    Posts
    100

    Date field reverts to 12/30/1899 once edited tabbed away from


    I have a form, derived from a query, that includes text boxes for Begin Date, Begin Time and End Date, etc. When I enter a new Begin Date field and tab to the Begin Time field and enter a new time and tab to End Date the Begin Time reverts to 12/30/89. How can I prevent this. The same thing happens to End Time. The dates and time come from a Date/Time field in the queried table. The form field are faormatted to Short Date and Short Time, respectively.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    might have to see the sql for the query. If you wrote the sql, perhaps it's missing the date delimiters, thus is defaulting to 0. Zero would be 12/31/1899 in pc (not mac) methinks. But you show 89 and 99 in your post, so not sure if that's the reason.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    shylock is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Sep 2018
    Location
    Dayton, Ohio
    Posts
    100
    Sorry about the typo. It reverts to 1899 NOT 89. The SQL is as follows:

    SELECT TOP 50 DowntimeEvent.BeginDate, DowntimeEvent.EndDate, DowntimeEvent.Description, DowntimeEvent.Planned, DowntimeEvent.ReportedBy, DowntimeEvent.ServerName
    FROM DowntimeEvent
    ORDER BY DowntimeEvent.BeginDate DESC;

    Below are partial imges of the form. As I said in the orginal post, the dates and times field of the form are formatted to Short Date and Short Time. Hope this helps.

    Click image for larger version. 

Name:	before.PNG 
Views:	14 
Size:	6.4 KB 
ID:	35572Click image for larger version. 

Name:	after.PNG 
Views:	14 
Size:	9.3 KB 
ID:	35573

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Sorry, I don't know. Even if you were on a Mac (using 1904 date system) it wouldn't explain this. Judging by the pictures, 1st field looks like a date field, yet you say in the original post that the issue exists in a time only field so it's kind of confusing. Suggest you look in the table itself (maybe copy it so you can play around) and ensure the data is as you expect, then remove any formatting you have at the table level. Not sure what you have as a time field either. A date field formatted as short time should show 23:44 for 11/03/12 11:44:44 PM, but you need the whole date. If you are trying to work with only time values without the date, that might be your problem. Dates are a serial number and are only formatted to appear as dates. Everything to the left of the decimal is days, to the right, some count of of elapsed fractional seconds (can't recall if milliseconds or what). The date I posted is 41216.9898032407. If you format it as short time, you get the hours/minutes equivalent of what's to the right of the decimal. Thus your source data in your time field and/or your use of short time format might be the problem. If you've only got hours:minutes in the field, then your value is really low for a calendar date. However, I would have thought it would have to be negative in order to show anything before 1900. If this is the cause, then I have to wonder why you're using only the time portion in a field. If you need to enter that, this field might have to be text, but that would introduce problems when trying to work with those values, which might bring us to what's often the real problem - one of design for the purpose.

    I see nothing wrong with the sql since you're not applying any criteria to it. If you can't figure it out from this info, or if someone else doesn't exactly know here, then maybe compact/zip your db and post it here.
    Last edited by Micron; 09-21-2018 at 03:09 PM. Reason: added info

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 04-03-2018, 03:53 PM
  2. Replies: 2
    Last Post: 06-25-2014, 11:00 AM
  3. Can Calculated Field (Text) Be Edited?
    By melhzy in forum Access
    Replies: 1
    Last Post: 11-26-2012, 12:12 PM
  4. Access Reverts Back to Original Data
    By Howardlr in forum Access
    Replies: 5
    Last Post: 05-24-2012, 08:23 AM
  5. Adding 'Last Edited' Date
    By vCallNSPF in forum Forms
    Replies: 2
    Last Post: 12-16-2009, 04:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums