Reports :: Attendance Database - Show Time In And Time Out For Specific Date
Apr 3, 2014
I have an attendance database and I connect the time attendance machine db to my access db, what i am trying to do is to generate a report that shows the time in and time out for specific date. the type of attendance db is date/time.
Please see the attached screenshot db from attendance machine.
an also some time there is duplicate entry, I need to get the first and the last entry only for specific date.
I am setting up a database to help me prepare codes for employees timesheets in order to upload them into our payroll software. The table structure below is just my preliminary thoughts and current ideas and I guess I'm looking for ideas on how to work with my codes.
EMPLOYEE TABLE EmpID (PK) - Employee ID # [Autonumber] Surname - Employee's surname [Text] Firstname - Employee's first name [Text]
ATTENDANCE TABLE ShiftID (PK) - Shift ID# [Autonumber] EmpID (SK) - Employee ID# [Foreign Key] Date - Date of shift [Date/Time] Start - Start time of shift [Time] Finish - Finish time of shift [Time] CostCtr - Cost centre being billed for shift. [Integer]
When employees work they are entitled to the following: * Ordinary hours (code 001) for all hours worked. * 10% penalty (code 006) for all hours worked when shift finishes after 18:00 * 12% penalty (code 007) for all hours when shift crosses midnight * 50% penalty (code 008) for hours worked on a saturday * 100% penalty (code 009) for hours worked on a sunday
The following shows data that in my Attendance table for an employee who worked shifts on the 16th (Mon), 17th (Tue), 20th (Fri), and 22nd (Sun). ShiftIDEmpIDDateStartFinishCostCtr 18443416/10/0610:0019:00 28443417/10/0610:0019:003002 38443420/10/0622:0006:003001 48443422/10/0614:0022:00 From the above data I believe I will need to make another table that contains the entitlement codes generate from each shift.
For the first shift on Monday 16/10/06 I need to collect the following codes for the total calculation: CodeHoursCostCtr 0019.00 0069.00
For the second shift on Tuesday 17/10/06 I need to collect the following codes for the total calculation: CodeHoursCostCtr 0019.003002 0069.003002
For the third shift on Friday 20/10/06 I need to collect the following codes for the total calculation: CodeHoursCostCtr 0018.003001 'Ordinary hours worked 0078.003001 '12% penalty as shift crossed midnight hour 0086.003001 'Only worked 6 actual hours on the Saturday as 2 hours were on Friday night.
For the fourth shift on Sunday 22/10/06 I need to collect the following codes for the total calculation: CodeHoursCostCtr 0018.00'Ordinary hours worked 0098.00'Hours worked on the Sunday
From that information the only data I really need to store in a table would be the totals grouped by code and cost centre. Eg., CodeHoursCostCtr 00117.00 001 8.003001 001 9.003002 006 9.00 006 9.003002 007 8.003001 008 6.003001 009 8.00 Does anyone know the best way to go about this? Should I generate a new table that links these codes to an employee? Should I make a function to calculate the codes for each day and store them in a table or make the function only sum the code totals for the week and store them in a table?
I have a database that stores information for lab testing. Each time a tech does a "step" in the test process he logs it in the table, using an input form. There are different categories, for example preparation, testing, analysis, etc, and each of those steps take time. I have the form autopopulate the date and time with NOW() evertime the form is updated. What i want to do is calculate the time it takes to do each in days. I can easily get how many days it was from now since they logged the test, =NOW()-TestDateTime. What I want to do is get the number of days it took to do each step, ie the number of days between each event. Is there a way to do this?
Any sample database where its about Time In and Time Out Attendance. It will just calculate the difference of Time In Time Out with employees Card Number.
The Time In and Time Out attendance is provided (no data entry), it is generated from other tool. I will just load it from an excel sheet to the access database and it will calculate and generate report. Default should be 9 hours per day, if they wont render 9 hours it will show in Difference column. Form will be like this:
ID Num: | Name: | Time In: | Time Out: | Total |Difference (missing hours)
12345 | Al Smith | 8.00am | 5:00pm | 9 | 0 54321 | Joy Pitt | 8.00am | 4.30pm | 8.30 | -0.30
Hi, i cannot load posts from a specified date and time
PostDate = now()
'AID = accountID of the poster
'read post after added into DB Set rsForum = Server.CreateObject("ADODB.Recordset") strForumSQL = "Select * From tblPost where tblPost.PostDate = '"&PostDate&"' and tblPost.PostBy = "&AID&"" rsForum.Open strForumSQL, strForumCon,3,3 PostID = rsForum("PostID")
I gets an error when posting messages, i think is because: tblPost.PostDate = '"&PostDate&"'
PostDate is no text field, its a Date field and i tried to use this symbol: ' around postdate, i also tried to not use it, but then i gets another error:
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'tblPost.PostDate = 12/11/2005 10:32:50 AM and tblPost.PostBy = 6'.
but that is because the date/time format uses spaces. How can i fix this?
I have a form for creating projects in a database. I originally set this up with 5 buttons for when the project is due to be at 1 hr, 2 hrs, etc. Now, they "management" want me change two of these for end of shift of on the current day and start of shift for the next day. This is the code I had before for the 6 hrs:
Private Sub Command152_Click() Me.DueTime = RoundTime(Now() + 6 / 24, 1800) End Sub
Hello buddies :D, do you have any idea how to make this work?
To select data that falls within this criteria of date range between cboDate and cboDate2 (fields on my form). The date in [tblJobDetails]![timeIn] come in this format "08/17/06 10:24 AM", but the cboDate/cboDate2 (takes in date only e.g 08/17/06) what i am after is to evaluate specific hard coded time in addition to the date entered, i.e. even tho, i haven't entered time on the cboDate/cboDate2, I want specific time hard coded where e.g If i select a date range of 08/17/06 and 08/18/06 on my cboDate and cboDate2 it should really be evaluating: 08/17/06 8:00 AM to 08/18/06 8:00 AM.
This is the criteria i curentlly have on my query in design view tha works perfect in selecting date only. ([tblJobDetails]![timeIn]>=[Forms]![frmPendingJobs]![cboDate] Or [tblJobDetails]![timeIn]>=[Forms]![frmPendingJobs]![cboDate] Is Null) And ([tblJobDetails]![timeIn]<=[Forms]![frmPendingJobs]![cboDate2] Or [tblJobDetails]![timeIn]<=[Forms]![frmPendingJobs]![cboDate2] Is Null) How can I incorporate 8:00am to 8:00am into my cboDate and cboDate2. What can i do to make this happen? Your kindness will be greatly appreciated http://www.naijaryders.com/forums/images/smilies/thankyou.gif
Hey, I've got to make a query that displays all records whose Date/Time field appear after another tables Date/Time field. I suppose I could say this is for use in an "Item scanned into inventory, Item Scanned out of Inventory" fashion.
To purpose is to use the total items returned after the date/time to be subtracted from the total of items that were scanned in at an earlier date.
I always tend to get redundant because I'm never sure how well I explain something, it would work something like such:
So effectively the query would run, with the date/time criteria being ItemID 1's Date/Time. It would ignore the 1:00 entry as it occured before the first Item that was scanned in, and return that we have 0 ItemID 1s in inventory.
Inventory is just being implemented it was seat of your pants in the past that is why I have this dilemma we dont know how many are in stock until we check it manually but we know how much has left. This is why data before our manual check is not important to our current totals. We could have sent out 5 ItemID 1s but only have 1 in stock now, and if we use that data we would have -4 in inventory. I'm attempting to use the oldest date/time of the manual scan (table 2) as a criteria per item scanned against table 1. Hopefully, to return the present total of items on hand.
Edit* As a note, I understand how to use >=#1/1/08 1:00:00# as a criteria but for some reason I cannot swing using a field in a table as criteria. That's pretty much what I can't find on the board or in my books.
I have a weekly list of transactions that come in the format DD/MM/YYYY HH:MM:SS, I need to tag these individual transactions with a week number. The problem is, I can't use the Datepart function etc. as the day is classed as running from 8am to 8am rather than midnight. I have a list of all of the weekly date ranges for a few years (with the time) so I was able to solve this problem in excel by using the Index and Match functions. However, I'm trying to automate this process as much as possible so I'd rather perform this function in Access.
I have a database with date and time each stored in a separate field. Now I want to query the database based on a start date/time and an end date/time. I started with the code below but it only returns events within the same time range on each day when what I really need is every event from a specified date and time through a specified date and time.
SELECT myTable.ID AS myTable_ID, myDate, myTime, FirstName, LastName FROM Staff INNER JOIN myTable ON Staff.ID = myTable.StaffID WHERE myTable.myDate >= #3/2/2014# AND myTable.myDate <= #3/3/2014# AND myTable.myTime >= #8:00PM# AND myTable.myTime <= #11:00PM# ORDER BY myDate desc
In the above example what I want is every event from 3/2/2014 8:00PM until 3/3/2014 11:00PM. But what I get instead is every event between 8:00PM and 11:00PM on 3/2/2014 and every event between 8:00PM and 11:00PM on 3/3/2014.
I have some project run on MS-Access as front-end with database linked to MS-SQL Server. I have some column of table contain Date-Time data that store data as General Date format (ie 01/01/2005 08:00:00). I create some form for my staff to key in a data of lab test that they will be key in only time with out date value. On form, I show this value as time only too. But I want to use this data with Date value for some calculate as backgroud process.
So...
In case of new data, Database will be store my data as CurrentDate with Time that my staff key in.
In case of data update, Database will be store my data as ExistDate with Time that my staff may update.
I have some project run on MS-Access as front-end with database linked to MS-SQL Server. I have some column of table contain Date-Time data that store data as General Date format (ie 01/01/2005 08:00:00). I create some form for my staff to key in a data of lab test that they will be key in only time with out date value. On form, I show this value as time only too. But I want to use this data with Date value for some calculate as backgroud process.
So...
In case of new data, Database will be store my data as CurrentDate with Time that my staff key in.
In case of data update, Database will be store my data as ExistDate with Time that my staff may update.
I have a date/time text field on a form with the General Date format and a combo box next to it that has sequencial times as the row source (IE. 12:45 AM, 1:00 AM, 1:15 AM, 1:30 AM, ETC.) When the user chooses a time in the combo box, I want the time portion of the text box to be updated with the chosen time in the combo. I have tried a few things but cant seem to get it right.
so i created a system to have events booked, and i am trying to check time availability of the event room available, but i dont know what wrong. it either my query or vba code. i have attached the attachment,
I have a form that request information from the user (StartDate, StartTime, EndDate and EndTime) the problem is that it's not working. The only way I can get any data to show is when I remove the StartTime and EndTime. Only then will it pull the items from the StartDate and EndDate.
Here is what I have as my criteria: Between [Forms]![OpPROD_ALL]![StartTime] And [Forms]![ OpPROD_ALL]![EndTime] And Between [Forms]![ OpPROD_ALL]![StartDate] And [Forms]![ OpPROD_ALL]![EndDate]
The users will be able to request a report based on a start and end date along with a start time and end time.
Side note: this is to pull date for 3rd shift (Example) 4/14/2013 10:00PM - 4/15/2013 10PM
i'm trying to filter is a datetime value and it just doesn't whant to work.I tried to make a separate unbound text field to filter out the Datetime into year and then filter that field out with year but it doesn't work. What I did:
-I clicked on the control element of the unbound text field. -made a expression with this code : datepart ("YYYY", [BeginDatetime]) -(BeginDateTime is a table value) -After this one it keeps showing me this error : -"the syntax of the expression You've taken specified is invalid"
I have a database for managing time related contracts.
I need to be able to run parameter queries but if I query the data by start date then and contracts which are current but started before the first date entered in the query (this is the same for end dates) are not shown.
Wonder if someone can help please. I'm quite new to Access so please bear with me.
I have a data field in my database consisting of both a date and time.
I then have a form containing two fields where the user can type a 'To' and 'From' date to extract the records that they are interested in. The query behind this uses the 'Between[Enter The Date] And [Enter The Date]' coding.
The problem is that because the field contains a time it doesn't return any records when I run the query.
Can anyone offer a bit of guidance on how I could ignore the time part of the field perhaps by adapting the above.
I have a column/field named [DateTaken] which contains test dates and times in the same cell. I am needing to find those with a test time less than 2:30 pm or <14:30pm.
I have a large table with a number of fields. I have written the query that I want but can't quite work out how to get it to do the main thing I need. I have several fields that I need to generate in the report but what I want it based on is the field called Date Approved.
When the Date Approved has been Active for more than 4 weeks I want to pick it up in the report. I don't want to set a date to start from but pick up everything that has passed 4 weeks in "Date Approved".
I have an application with a backend db on PC 1, and the same application on PC 2 linked to the backend db on PC 1 via the network.
The link works fine but the time formats are different.
On PC 1 the time format is shortime and displays as it should i.e. in 24 hour clock format
However on PC 2, opening the same database via the network, the time format is still shorttime but when you read the time within the code it comes out in AM/PM format. Also, when the defaul tiem should be #20:00:00# but this changes to #8:00:00 PM#
Weirdly though, when you just open the table, the times are in the correct shorttime format.
Guessing, it must be a setting within the main core of Access 2003 that is different between the 2 instances?
I would like to have a macro run at a set time each day. I hoped to use .ontime but apparently that doesn't exist in access.
The macro must run at 10:00am each day, the db will be open from 8:30am until 16:30pm so no problem from that point of view +/- a few mins when the staff arrive.
After you click yes, it can be locked forever, but not before you click the save button or if you clicked No on the msg box.
3. For another command button, how do I disable it after you have clicked it, and not enable it again until after you enter some value into a text box?
My message box now:
Dim msg As String 'Ask user if they want to save the record. msg = msg & "You cannot change Student Name and Course Enrolled after you save. Proceed? " If MsgBox(msg, vbYesNo, "Warning") = vbYes Then 'Run the command DoCmd.RunCommand acCmdSaveRecord 'Lock the following keys Me.Home_Tel.Locked = True Me.Student_Name.Locked = True Me.Class_Enrolled.Locked = True
Else Me.Home_Tel.Locked = False Me.Student_Name.Locked = False Me.Class_Enrolled.Locked = False Exit Sub End If
I'm trying to create a query that will sum the total time of a specific field. It seems to be doing it, however the value is off by by a couple minutes on all my examples.
Table
- BusArrivalTime - BusDepartTime
Query
In my Query I'm making a new field like this. It correctly figures out the difference.
Next I'm displaying that Query information inside of a Report by putting this in the Text Box on the Report. It correctly displays the time in the Hours/Minutes format.
=[BusWaitTime]60 & Format([BusWaitTime] Mod 60,":00")
Lastly, I'm using another Text Box on the Report to Sum the Grand Total of the Wait Time for all my records. Here is what Im putting in the Control Source
=Sum([BusWaitTime])60 & Format([BusWaitTime] Mod 60,":00")
...and it's summing my records, but the value is off by a few minutes and I cant figure out why.
In my example, I have 3 records with times of 3:14, 1:35, and 3:20. It should be totaling a figure of 8:09 but its coming to 8:14 instead.