Results 1 to 6 of 6
  1. #1
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Funky date thing happening showing 1917 ??


    Hello all!

    Just getting started on a new project, hammering out the details, I have a schedule form which calculates the dates things are due. All the fields calculate correctly EXCEPT for the "ProductDue" field which give me a year of 1917. I've started over and imported all objects in case its corruption, to no avail. Still get 1917. I've attached the db skeleton, the form is Schedule. Any thoughts? TIA! Windows 10/Access 2016.

    Database21.zip

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Quote Originally Posted by Gina Maylone View Post
    Hello all!

    Just getting started on a new project, hammering out the details, I have a schedule form which calculates the dates things are due. All the fields calculate correctly EXCEPT for the "ProductDue" field which give me a year of 1917. I've started over and imported all objects in case its corruption, to no avail. Still get 1917. I've attached the db skeleton, the form is Schedule. Any thoughts? TIA! Windows 10/Access 2016.

    Database21.zip
    Where is the calculation of dates for "ProductDue".

    As far as I can see the form called "Schedule" is just showing the data from its bound table.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    your field is not a calculation...its a date.
    formulas are in the textbox, with you dont have. Yours is a straight connection to the field.
    formulas should be in a query or a calculated field.

    what did you use to input the 1917 date?

  4. #4
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    The date fields get set once the delivery date is entered:
    Code:
    Private Sub DeliveryDate_AfterUpdate()
    Me.ShipDate = DateAdd("d", -4, [DeliveryDate])
    Me.BubbleChartMin = DateAdd("ww", -10, [ShipDate])
    Me.BubbleChartMax = DateAdd("ww", -8, [ShipDate])
    Me.ProductDue = DateDiff("ww", -2, [DeliveryDate])
    Me.THDFiscalWeek = DateDiff("ww", Forms![Orders]![fiscalyear], [DeliveryDate])
    
    
    End Sub
    Thanks!!

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    DateDiff() will not return a Date Value.

    Tell us in plain English how you would determine "ProductDue". eg: 2 weeks form today or 3 days before "ShipDate"
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    LOL! It should be dateadd not datediff! Thanks Fitz! I knew I needed another set of eyes. Have a great day!!

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

Similar Threads

  1. Replies: 15
    Last Post: 11-22-2016, 02:14 PM
  2. Replies: 6
    Last Post: 10-28-2016, 08:37 AM
  3. Replies: 5
    Last Post: 09-02-2015, 11:39 AM
  4. Replies: 6
    Last Post: 02-04-2011, 04:26 AM
  5. I need help with weird stuff happening on a DB
    By makotoshishio in forum Access
    Replies: 9
    Last Post: 04-02-2009, 12:20 PM

Tags for this Thread

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