473,500 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ms Access - How to use query to track employee weekly attendance

6 New Member
Hi, I am new to MS Access, My company want me to create a Weekly Attendance tracking system base on the table structure.Which enable to Summarize which employee took the most Annual Leave, Medical Leave.

I have a table called Attendance with fields like -
Which consist from Mon - Fri. When a new week, the system
will append a new set of records - EmpName, and I will have to fill up their status from Mon to Fri.

Name|..Mon..|.MonDD..|Tue|TueDD|Wed|WedDD|Thur|Thu rDD|Fri|
John...ML.....1/1/11......ML..2/1/11
Peter...........................AL..3/1/11..AL..4/1/11
David.................ML..2/1/11
Nancy............................................. ..

My form will display all empname for that week

1 Sep to 7 Sep
Emp Name | ML | AL |
John.........2....0
Peter........0....2
David........1....0
Nancy........0....0

I tried using MS Query, but my access knowledge was limited. Can anyone enlighten me.
Sep 18 '11 #1
3 3726
nico5038
3,080 Recognized Expert Specialist
Hi James,

I would start with an advise to change your table structure to a normalized one like:
EmployeeName (The employee name)
WorkingDay (Just the Date)
LeaveType (ML/AL)

Now all data can be stored in one table.

For the counting you can use a so-called "cross-table" query.
Just place the EmployeeName, WorkingDate and LeaveType fields in the graphical editor.
Next change the query type to "cross-table" and two additional rows will appear.
In the first one specify EmployeeName and LeaveType as "GroupBy" and WorkingDate as "Count".
In the second row specify for EmployeeName "Rowheader", for LeaveType "Column header" and for WorkingDate "Value"
Now add the start- and end-date in the criteria like:
BETWEEN #9-1-2011" and #9-7-2011#

This query will show the date in the format you need for the form.

Getting the idea ?

Nic;o)
Sep 18 '11 #2
JamesKang123
6 New Member
Thanks for your reply , I will try it out.
Sep 18 '11 #3
NeoPa
32,557 Recognized Expert Moderator MVP
You may find Database Normalisation and Table structures helpful.
Sep 26 '11 #4

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

Similar topics

0
2795
by: david liu | last post by:
access 2000 query: here's what i want to do. from an asp page, perform a search on a table in access. i have used sql code in the asp page itself, but i'd rather execute a query in access. i...
5
3620
by: Art | last post by:
Hi, Can anyone point me to an example of how I would execute a query I've created in an Access DB. I've copied the SQL down to my VB.net application and that works fine, but it's ugly. I'd like...
0
1263
by: F I S H | last post by:
The site I am going to build has roughly 1000 html, php, asp, mp3, pdf, swf, doc. jpg, txt files etc....... I put them in 100 different folders. 200 users will be given access to 10 folders...
4
2639
by: ShastriX | last post by:
Getting a weird error while trying out a query from Access 2003 on a SQL Server 2005 table. Want to compute the amount of leave taken by an emp during the year. Since an emp might be off for...
12
5241
by: zwasdl | last post by:
Hi, I'm using MS Access to query against Oracle DB via ODBC. Is it possible to use HINT in Access? Thanks, Wei
4
3215
by: douglaswade | last post by:
I am new to Access, but I find this answer a little difficult to understand. I have an access query that list late work, I want to run the query and let say the results is ten records. I want one...
0
2843
by: Bill | last post by:
I've searched comp.databases.ms-access for a solution and found help but still haven't got my problem solved. I want to record weekly attendance and print an attendance "check off" sheet where...
5
1643
by: silversubey | last post by:
I have a query that works in Access. It pulls time in a format that is understood by Quickbooks. We are upgrading our access-based program to MSDE. I have tried 3rd party converters and searched...
6
4369
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
15
5225
by: OzNet | last post by:
I have a query (with calculated fields) in Access (2007) and the data changes depending on the dates and staff person selected. I need to produce a series of graphs based on the data in this query...
0
7180
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,...
0
7229
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...
1
6905
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
5485
agi2029
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,...
1
4921
isladogs
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...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.