Hi, right now i have a database that calcul attendance time.
I have a qry with Date, EmployeeName, EmployeeID, PayCodeName,
TimeInSecond.
In the PayCodeName there is multiple thing, like, Regular or Overtime.
(this is how the employee is pay).
So the result of my qry may look like this:
------------------------------------------------------------------------------------------
2006-01-29, Sponge Bob, 12345, Reg, 21 600
2006-01-29, Sponge Bob, 12345, Reg, 3 600
2006-01-29, Sponge Bob, 12345, Overtime, 3 600
------------------------------------------------------------------------------------------
My table r from an application and i cannot change the display:what i
mean is that the app return me couple of line with regular, (ie: from 9
-12 then the lunch time is cut, and from 13 to 16), and if it's an
overtime day i may end up with 2 lines with regular time on it ans 2
lines with overtime.
What i wanna do is be able to calcul all the regulard time and then all
the overtime. And hae it display like that in a rpt.
EmployeeID
12345
EmployeeName
Sponge Bob
Date PaycodeName
TimeInSecond
2006-01-29 Reg
21 600
2006-01-29 Reg
1 600
2006-01-29 Overtime
1 600
Total : Reg: (21600+ 1600) displayed in hours
Overtime (1600) displayed in hours
The date part is in the detail of my report. My problem is i'm not sure
how to say to acces, Sum everything that is in Reg, and then Sum
everthing that is in Overtime.
IS there a way i can do that in VBA?? PLS help me. 2 1375
solve, i changed the form. now it's okay.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Not sure what you're asking, so....
In a query you can get the sums per PayCodeName like this:
SELECT Date, EmployeeName, EmployeeID, PayCodeName,
Sum(TimeInSecon d) \ 3600 As HoursWorked
FROM <query name or table name>
GROUP BY Date, EmployeeName, EmployeeID, PayCodeName
In the report you can use a running sum property of a TextBox like this:
Name the control that holds the TimeInSecond value something like
"txtSeconds ." Next to the txtSeconds control place an inVisible TextBox
with properties like this:
Control Source: =IIf(PayCodeNam e="Reg",txtSeco nds,0)\3600
Visible: False
Running Sum: Over Group
Name: txtRegularTime
Now make another TextBox with properties like this:
Control Source: =IIf(PayCodeNam e="Overtime",tx tSeconds,0)\360 0
Visible: False
Running Sum: Over Group
Name: txtOverTime
The interger division (\) by 3600 will translate the seconds into hours.
Then in the Employee's Group footer put two TextBoxes with properties
like this:
Control Source: =txtRegularTime
Visible: True
Running Sum: No
Name: txtSumRegularTi me
Control Source: =txtOverTime
Visible: True
Running Sum: No
Name: txtSumOverTime
--
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQ9frAYechKq OuFEgEQJSzwCg58 fnbnEXU0cV0mcP9 xvQjFk9+2AAoMmO
dV0t86uo5hAuBb5 Yiw6w6g4s
=Z56P
-----END PGP SIGNATURE----- No***********@h otmail.com wrote: Hi, right now i have a database that calcul attendance time.
I have a qry with Date, EmployeeName, EmployeeID, PayCodeName, TimeInSecond.
In the PayCodeName there is multiple thing, like, Regular or Overtime. (this is how the employee is pay).
So the result of my qry may look like this: ------------------------------------------------------------------------------------------ 2006-01-29, Sponge Bob, 12345, Reg, 21 600 2006-01-29, Sponge Bob, 12345, Reg, 3 600 2006-01-29, Sponge Bob, 12345, Overtime, 3 600 ------------------------------------------------------------------------------------------ My table r from an application and i cannot change the display:what i mean is that the app return me couple of line with regular, (ie: from 9 -12 then the lunch time is cut, and from 13 to 16), and if it's an overtime day i may end up with 2 lines with regular time on it ans 2 lines with overtime.
What i wanna do is be able to calcul all the regulard time and then all the overtime. And hae it display like that in a rpt.
EmployeeID 12345 EmployeeName Sponge Bob Date PaycodeName TimeInSecond 2006-01-29 Reg 21 600 2006-01-29 Reg 1 600 2006-01-29 Overtime 1 600
Total : Reg: (21600+ 1600) displayed in hours Overtime (1600) displayed in hours
The date part is in the detail of my report. My problem is i'm not sure how to say to acces, Sum everything that is in Reg, and then Sum everthing that is in Overtime.
IS there a way i can do that in VBA?? PLS help me. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mike420 |
last post by:
In the context of LATEX, some Pythonista asked what the big
successes of Lisp were. I think there were at least three *big*
successes.
a. orbitz.com web site uses Lisp for algorithms, etc.
b. Yahoo store was originally written in Lisp.
c. Emacs
The issues with these will probably come up, so I might as well
mention them myself (which...
|
by: lorelei |
last post by:
Hey all!!
Well, I've decided to take the dive and attempt my very own HTML coded
website rather than use a page-editor thingy.
Anyway, I'm attempting to write a style sheet, and have read various
sources describing how to do them and set them out. Whether I'm
completely stupid or whether it's simply because I haven't been able
to ask...
|
by: Spartanicus |
last post by:
How to get help from this group, and how to construct a minimised test
case: http://www.spartanicus.utvinternet.ie/help_us_help_you.htm
--
Spartanicus
|
by: z_learning_tester |
last post by:
But I can't seem to find the answer.
The question is how do you reverse the words in a string?
Or how do you reverse the numbers listed in a string?
The example is usually something like:
Turn this string "1,2,3,4,..."
Into "...4,3,2,1"
This one seems hard enough let alone trying to turn a string of
space-seperated words around(is that...
|
by: jkmambo |
last post by:
Session data is getting lost in PHP version 4.4.1 which used to work in
version 4.3.3
The code is similar to the one below
Assume the file is called count.php which requires a parameter
productid;
session_start();
if (!isset($_SESSION)) $_SESSION = 0;
| |
by: maxkumar |
last post by:
Hi,
I am running a ASP.NET 1.1 site on Win Server 2003 with IIS 6.0. The website
has been running for about 1.5 years now. In the past, we used to have random
cases of session variables getting lost, but not frequently. However, since
the past 2 weeks, I am noticing an alarming increase of such session
variables lost cases. My application log...
|
by: per9000 |
last post by:
Hi all,
I want to create an encryption program and started thinking about not
storing sensitive information in the memory since I guess someone
might steal my computer an scan my memory.
So I wrote this method for getting a password from the console and
converting it to an array of bytes for later use in the encryption
algorithm.
The...
|
by: jeff.maildump |
last post by:
Hi,
I've got multiple xmlhttprequests which are in a loop. So this is the
loop I have so far, with the closure given to me in a previous post:
//-------------------------------------------------------------------------------------
for (i=0; i<data.length; i++) {
httpRequest = false;
httpRequest = new XMLHttpRequest();...
|
by: kallol |
last post by:
Hi Everyone,
I have a form designed with a table and the table is inside a <div> (Required. Can’t get rid of it). The div has style “height: 100% and scrollable: auto”.
The issue: In IE, let say, the form is bit longer and overflowed the page so the div has got vertical scroll bar. Now I am inserting data in the form.
Inserted the 1st...
|
by: deepaks85 |
last post by:
Dear Friends,
I am still waiting for the reply.............please help me. I really need it.
Here is my problem:
I am using fckeditor on my webpage and the data is getting saved into mysql database. But when I am trying display or modify that data again into fckeditor, the formatting is getting lost. How can I retain the formatting as I...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |