435,294 Members | 2,687 Online
Need help? Post your question and get tips & solutions from a community of 435,294 IT Pros & Developers. It's quick & easy.

# Sum Entries

 100+ P: 135 How do I sum entries? I am working on a form that keeps track of employee hours by labeling each day worked with a letter. "W" for work, "V" for vacation, etc. What I need to do is be able to add all the W's (say, each W equaling 8) and all the V's. Any suggestions? Thanks Nov 26 '08 #1
4 Replies

 Expert 100+ P: 1,287 If your table has fields like Day, W(number), V(number) then in the footer of the form, you can put a text box with the source =Sum([W]) + Sum([V]) Nov 26 '08 #2

 100+ P: 135 @ChipR My table has fields for each day of the week. My company uses a simple letter code representing the time used that day. W = Regular 8 hour work day, V = Vacation, S = Sick, P = Personal. In the fields for each day of the week will be a letter. On my form I want to be able to add the total of different letters. If I have 5 V's I want to be able to show that numerically in an unbound text box. The figure in the text box is then applied to a field used to keep track of vacation time in the on close event of the form. Nov 26 '08 #3

 Expert 100+ P: 1,287 Tricky. Take a look at DCount http://office.microsoft.com/en-us/ac...288171033.aspx I think maybe you'd have to do DCount("Monday", "MyTable", "LetterCode = 'W') + _ DCount("Tuesday", "MyTable", LetterCode = 'W') + _ DCount("Wednesday", "MyTable", "LetterCode='W') + etc. But depending on what's in your table, you maybe have "LetterCode='W' AND EmployeeNumber = " & EmployeeID & " AND WeekNumber = " & WeekNumber That's how I'm doing it right now, but maybe someone has a better answer now that we have a little more info? Nov 26 '08 #4

 100+ P: 135 @ChipR Thanks ChipR. I'll follow your lead and give it a try. Nov 26 '08 #5