Date Count

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wayneyh
    New Member
    • Mar 2008
    • 67

    #1

    Date Count

    Hi guys

    I am trying to create a form that shows the number of days an employee has had off.

    I type in the users name and from that i get a subform with the history of absences and i also want a text box that counts the amount of days between FromDate and ToDate from the users history.

    Please help

    Regards
    Wayne
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    You haven't given us much information to work with here Wayne. Nor what format the information you have mentioned is in.

    From this it's not really possible even to consider your problem properly.

    Try some more precise details and we'll see what we can do.

    Comment

    • Wayneyh
      New Member
      • Mar 2008
      • 67

      #3
      Sorry for the lack of info. Basically i am trying to count the days absent an employeehas had off from a Table, tblAbsent. The table contains the following fields:-

      EmployeesName - Textbox
      FromDate - ShortDate
      ToDate - ShortDate
      AbsentReason - Memo
      OfficeNotes - Memo

      I created a Form, frmAbsent with all the above. The employee could have several entries into the table. I want to search for an employee and see the history of absences in a subform on frmAbsent and either a textbox or another subform showing the amount of days off by counting all the fromDates and ToDates for that employee.

      I tried a query but it didn't work.

      Comment

      • Wayneyh
        New Member
        • Mar 2008
        • 67

        #4
        Sorry to complicate things. All I am trying to do is count the days between the FromDate And ToDate.

        Regards

        Wayne

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32669

          #5
          Is it simply the DateDiff() function you're looking for then?

          Comment

          • Wayneyh
            New Member
            • Mar 2008
            • 67

            #6
            Thanks Neopa, Thats exactly it. Had a serious brain block today. Thanks again.

            Regards

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32669

              #7
              Excellent :)

              We all go there. trust me ;)

              Comment

              Working...