Creating a Line Chart

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fd1
    New Member
    • Sep 2007
    • 38

    #16
    Originally posted by ADezii
    Post a sub-set of the data that is causing the Duplicate Records, and I'll look at it as soon as I get a chance.
    Delivered Date
    ---------------------
    4/13/2007 <----Start date
    4/13/2007
    4/20/2007
    4/26/2007
    6/6/2007
    6/6/2007
    6/6/2007
    6/7/2007
    6/7/2007
    6/8/2007
    6/15/2007
    6/20/2007
    6/21/2007
    6/21/2007
    6/21/2007
    6/21/2007
    6/27/2007
    6/27/2007
    6/28/2007
    .
    .
    .
    9/7/2007
    9/7/2007
    9/7/2007
    9/7/2007 <-----End date

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #17
      Originally posted by fd1
      Delivered Date
      ---------------------
      4/13/2007 <----Start date
      4/13/2007
      4/20/2007
      4/26/2007
      6/6/2007
      6/6/2007
      6/6/2007
      6/7/2007
      6/7/2007
      6/8/2007
      6/15/2007
      6/20/2007
      6/21/2007
      6/21/2007
      6/21/2007
      6/21/2007
      6/27/2007
      6/27/2007
      6/28/2007
      .
      .
      .
      9/7/2007
      9/7/2007
      9/7/2007
      9/7/2007 <-----End date
      I'll have a look and get back to you.

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #18
        Originally posted by fd1
        The only glitch I'm seeing when running the code is that in some cases I get duplicate records of dteEndDate at the end of tblFinalRecords if for example dteStartDate="4/13/2007" and dteEndDate="9/7/2007"
        I'm really pressed for time and I have to work all day tomorrow, but I do have a bandaid for you. It isn't very pretty, but it sure is functional.
        1. In tblFinalResults , make [Interval Date] the Primary Key (after Deleting any existing Records of course).
        2. Add Line #1 below to your code block at the specific point indicated.
          [CODE=vb]On Error Resume Next
          With MyRS
          If DCount("*", "tblFinalResult s", "[Interval Date]=" & dteEndDate) = 0 Then
          .AddNew
          ![Interval Date] = Format$(arrDate s(intCounter), "mm/dd/yyyy")
          ![Total Versions to Date] = Format$(DCount( "*", "tblVersion s", "[Date_Created] <= #" _
          & arrDates(intCou nter) & "#"), "000")
          .Update
          End If
          End With[/CODE]
        3. If the last Interval Date should happen to coincide with the End Date, Access will not allow the Record to be added because of the inclusion of the Primary Key on this Field. You will never see an Error because of the On Error Resume Next Statement.
        4. Like I said, not pretty but works!

        Comment

        • fd1
          New Member
          • Sep 2007
          • 38

          #19
          Thank you ADezii, it did the trick.

          Comment

          • ADezii
            Recognized Expert Expert
            • Apr 2006
            • 8834

            #20
            Originally posted by fd1
            Thank you ADezii, it did the trick.
            Glad that it worked for you.

            Comment

            Working...