By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,121 Members | 1,782 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,121 IT Pros & Developers. It's quick & easy.

Date Count

P: 67
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
Jan 28 '09 #1
Share this Question
Share on Google+
6 Replies


NeoPa
Expert Mod 15k+
P: 31,494
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.
Jan 28 '09 #2

P: 67
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.
Jan 28 '09 #3

P: 67
Sorry to complicate things. All I am trying to do is count the days between the FromDate And ToDate.

Regards

Wayne
Jan 28 '09 #4

NeoPa
Expert Mod 15k+
P: 31,494
Is it simply the DateDiff() function you're looking for then?
Jan 28 '09 #5

P: 67
Thanks Neopa, Thats exactly it. Had a serious brain block today. Thanks again.

Regards
Jan 28 '09 #6

NeoPa
Expert Mod 15k+
P: 31,494
Excellent :)

We all go there. trust me ;)
Jan 29 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.