473,395 Members | 1,441 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,395 software developers and data experts.

Saving Cumulative data via Weekly calculations

1
Working on a database to keep track of employee sick time.

Need to keep track of weekly hours worked because when employee reaches 600 hours they are eligible to earn sick time.

Once earning sick time, need to run a query to calculate weekly time cards on sick time earned and used and save that result in a table to be used in next weeks calculations.

Employee will earn 1 sick time hour for every 40 hours worked.

I can run the queries but how to I save the cumulative hours worked from each time card to determine when to start earning sick time?
Jan 10 '14 #1
1 901
zmbd
5,501 Expert Mod 4TB
Typically one does not save anything calculated unless for histrorical or auditing requirements (i.e. variable discounts for a merchandice sale or hotel booking, etc...).

You say that you can calculate what you need, then once you have that value then either the query, form, or report should be able to handle the basic calculation.

What I might do is:
1 query to calculate the hours worked per day for a employee with running total and a calculated field using IIF() such that when the running total >= 600 then start integer division with "RunnintTotal\40" *note that forward slash, it returns only the integer portion sortof like Mod() returns the remainders (^_^)

If you have a particular reason you need to store the results please let us know, there are several methods for this and the best one will depend on how your database is designed.
Jan 10 '14 #2

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

Similar topics

0
by: Parintas Themis STE Kardias | last post by:
I have a table with 2 fiels, F1 contain dates and F2 contains numeric. I have a control on the form and i wand to have the data monthly - weekly like this, according with the month of the control...
1
by: G Uljee | last post by:
Hi, I've an application with an Access database (max 10000 records). I want to save per 1000 records at once into the Access database, witch option do you prefer (example)? Someone...
0
by: Tommy Christian | last post by:
Hi! Anyone who knows about saving serialized data to database, coz I have a problem with that. If I just serialize my session data and then deserialize it, it works. But when I save it...
3
by: Mike | last post by:
Hello: I was not able to find a regular ASP group, so I posted this here instead. I have a web app which is actually just ASP using VBScript as the server-side language, running on IIS6. ...
0
by: @piranha | last post by:
hello, when i'm trying to save changed data from the dataset to datasource(an excel file) i get this error An unhandled exception of type 'System.InvalidOperationException' occurred in...
8
by: Art | last post by:
Hi folks, I'm writing a traditional desktop app using VB.NET and am stumbling over what seems like a very basic question: My app does not need to be connected to a server or another computer....
8
by: Mark | last post by:
Hello. I am attempting to write binary data from a file to an OLE Object field, and then write the file back out from the database. I am reading and writing the files in binary mode, and using...
5
by: Mark | last post by:
I have a VB 6 program that I have saved an audio file to using DAO and the appendchunk as is shown at http://support.microsoft.com/kb/103257/EN-US/. ; I have it working fine in that app (it saves...
5
by: Keith G | last post by:
VS2003 using VB.Net I want to be able to save drawing path data in a database. If I store the Points array for each GraphicsPath I can then reproduce (in this case) filled polygons at run time....
3
by: aaa | last post by:
How can I save data without connecting to data base every time a client's request arrives? If I work on a temporary memory I cannot work with sql queries, but connecting to data base takes time.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.