473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Sum Entries

135 100+
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 1382
ChipR
1,287 Expert 1GB
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
MyWaterloo
135 100+
@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
ChipR
1,287 Expert 1GB
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
MyWaterloo
135 100+
@ChipR

Thanks ChipR. I'll follow your lead and give it a try.
Nov 26 '08 #5

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

Similar topics

4
by: knoak | last post by:
If a filter with bad words etc. isn't what you mean, you could put an extra field in the DB, called 'OK' or something like that. When someone enters a message in the GB, the initial value of...
0
by: Krishna Prasad | last post by:
Hello, I am in the process of designing the following kind of system -- A MySQL database holds hundreds of thousands of entries. All of these entries are periodically processed by a set of...
3
by: andreas.maurer1971 | last post by:
Hi all, since a few years I use the following statement to find duplicate entries in a table: SELECT t1.id, t2.id,... FROM table AS t1 INNER JOIN table AS t2 ON t1.field = t2.field WHERE...
1
by: Odd Bjørn Andersen | last post by:
DB2 Enterprise Server Edition, version 8.1 (fixpack 6a) on Windows 2003. Is there a command to remove old entries both from Journal or old storage snapshots. Storage snapshots is saved in the...
2
by: Stephen Poley | last post by:
I have added a combo-box to a form but it frequently fails to display all entries in the table it is based on. There are 43 entries in the table; the control initially displayed only the first 12. ...
4
by: sri2097 | last post by:
Hi all, I'm storing number of dictionary values into a file using the 'cPickle' module and then am retrieving it. The following is the code for it - # Code for storing the values in the file...
7
by: Matt | last post by:
I have approximately 5 instances on my test server that are identical to my prod server. On the prod server, when I look at the services file, there is a single entry per instance and everything...
5
by: Manish | last post by:
The topic is related to MySQL database. Suppose a table "address" contains the following records ------------------------------------------------------- | name | address | phone |...
9
by: Suman | last post by:
Happy Friday everyone!!! I am working on a windows service and a C# application and needed some help with certain functionality. Please read through my issue below. Thanks! I have a windows...
3
blyxx86
by: blyxx86 | last post by:
Is there any method to limit the number of entries a person can go back when using a form? For example, being able to only go back to entries entered on date() that way I can be sure no older...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.