Capturing >90 day items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • favor08
    New Member
    • Jan 2007
    • 56

    Capturing >90 day items

    I have a fill called billefft with dates that can range from 1/1/05 through 5/01/07

    and I have a field called rpt date that is always 1/31/07 or the last date of the month each time the file is downloaded at month end.

    I am trying to write a query that for the criteria for the billeff date is say give me everything that is >90 days from the rptdate which is 1/31/07. So dates that are from 11/1/06 through 11/30/06 would not be picked up because they are considered 60 day items. I need everything that is 10/31/06 and prior.
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by favor08
    I have a fill called billefft with dates that can range from 1/1/05 through 5/01/07

    and I have a field called rpt date that is always 1/31/07 or the last date of the month each time the file is downloaded at month end.

    I am trying to write a query that for the criteria for the billeff date is say give me everything that is >90 days from the rptdate which is 1/31/07. So dates that are from 11/1/06 through 11/30/06 would not be picked up because they are considered 60 day items. I need everything that is 10/31/06 and prior.
    Code:
    SELECT tblTest.rptDate, tblTest.[billeff date], DateDiff("d",[billeff Date],[rptDate]) AS DayDiff
    FROM tblTest
    WHERE DateDiff("d",[billeff Date],[rptDate])>91;

    Comment

    • favor08
      New Member
      • Jan 2007
      • 56

      #3
      Originally posted by ADezii
      Code:
      SELECT tblTest.rptDate, tblTest.[billeff date], DateDiff("d",[billeff Date],[rptDate]) AS DayDiff
      FROM tblTest
      WHERE DateDiff("d",[billeff Date],[rptDate])>91;
      Thank You

      How do I write it in a filter for a option button:

      Code:
      Case 4
             ittype = 4
             '90 Day Items
              Me.Cmdclose.SetFocus
              Me.FPastDues.Form.FilterOn = False
              strSQL = "tara.pendte is null and tara.netC= 0 and Tara.BilleffDte =DateDiff(Day([billeffdte]),([Rptdt])>91"
              FPastDues.Visible = True
              Me.FPastDues.Form.Filter = strSQL
              Me.FPastDues.Form.FilterOn = True
              Me.BoxPast.Visible = True
              Me.lbldmdfax.Visible = False
              Me.lblforAll.Visible = False
              Me.lblpast.Visible = False
              Me.CboOpid.Visible = True
              Me.CboOpid = DLookup("[Opid]", "TARA", "[LoginID] = FOSUserName()")
              Me.CmdClear.Visible = True
              Me.BxClr.left = 7000
              Me.CmdClear.left = 7100
              Me.LblOpid.Visible = True
              Me.txtPolicy.Visible = False
              Me.lblpolicy.Visible = False
              Me.BxClr.Visible = True
              Me.BxClr.left = 7000
              Me.CmdClear.left = 7100
              iopid = Me.CboOpid
              If ittype = 3 And NZ(Me.CboOpid) <> "" Then
              Me.CboProd.Visible = True
              Me.LblProd.Visible = True
              Me.CboProd.RowSource = "qPast90DaysProdcd"
              Me.CboProd = ""
              Me.CboProd.Requery
              Me!FPastDues!ChckBxkeep.left = 25000
              Me!FPastDues!cmdRow.Visible = True
              Me!FPastDues!check.left = 50
              End If
      Last edited by NeoPa; Feb 5 '07, 11:22 PM. Reason: Tags for Layout

      Comment

      Working...