Queries :: Timesheet Database - Query Is Removing Records When Nothing To Sum

Jan 28, 2015

I'm creating a job/timesheet database and have a problem...

I have a main timesheets table that includes every job/piece of work thats been done (sometimes multiples for each employee each day). Each record contains a ref to the employee, ref to the contract, ref to the type of work, time taken and date.

There are then various tables that support the main table, which provide actual employee names etc.

I want to produce a query that provides the number of hours undertaken on each day of a particular week for each employee. So I'd have one row for each employee from the employees table, then a field for the sum hours for Monday through Friday.

The way I was going about this was

- to create five query's for the main timesheets table that would limit the entries to the five days in question - Monday-Friday. That worked fine.

- to then create a query that takes the employee name and using each of the five day based queries perform a Sum Total on the time field to give me the total hours worked for each day for each employee. That also worked fine, but the trouble is it removes any null values. So, if I only include the first day there might be 80 employees listed, but when I include the second day as well that goes down to 72 - presumably as 8 employees who entered timesheets for day 1 didn't for day 2. By the time I add all five days, I have almost no employees. I assumed that there would be a query level property to set, but i can't see one.

Also, is there a simpler way to do what I want? If I can get this working I'd like to replicate to breakdown by contract, job type etc in the same way as I have with employees.

View Replies


ADVERTISEMENT

Queries :: Timesheet Database - Query To Find Pending Submission?

Jul 8, 2013

I have developed a Timesheet database,

1) I have main table "tbltimsheet" which contains all the raw data enter by employees

2) I have employee info table "tblempinfo" Which contains all the employes information

3) Employee will submit timesheet on weekly. Under "tbltimesheet" i have a field for recording workweek

4) Now i need to find out who are all haven't submit the timesheet and for which week

5) I can find those who haven't submit timesheet but i need to know submission status of employee for every week.

View 9 Replies View Related

Queries :: Removing Duplicate Records In Query

Apr 24, 2014

Im trying to write a query that shows all the container movements. Yet when I run the query qryFullHistory I get a duplicate value for container Off Island. Ive tried adding some criteria that says that the DateRequested has to be between the ImportDate and ExportDate but that doesnt seem to work. There are duplicate entries for container Off Island in tblContainerDetails as the same container has arrived and left and then returned on another voyage. Yet there is no entry for the second voyage in the tblMEMRContainer.

A brief description of the tables is:
tblMEMR Movement requests details
tblMEMRContainers the containers that were moved on the movement request. There can be more than 1 container for each request.
tblContainerDetails details and dates for the container when it arrived and when it left

There are other tables but these are the 3 that are used in the query.

View 8 Replies View Related

Forms :: Timesheet Database - Restricting Edits To Records By Other Users

Dec 27, 2013

I have a timesheet data base and I wanted to find a way to restrict employees from editing other employees timesheets only their own timesheet... .is it possible with access 2010?

View 4 Replies View Related

Queries :: Removing Duplicate Records

Jul 23, 2015

I'm having a problem removing duplicate records from a table. It should be easy but I can't suss it.This is an example of the data in my table:

Code:

RefDateStatus
113007111/06/2015Do Not Pay
114454306/07/2015Do Not Pay
115760714/05/2015Do Not Pay
116520705/05/2015Do Not Pay
117670108/05/2015Do Not Pay
118036218/05/2015Do Not Pay
118517015/05/2015Do Not Pay
178734020/07/2015Do Not Pay
182809915/07/2015Do Not Pay
184226010/07/2015Payment Due
184226022/07/2015Payment Query

As you can see, there are 11 records here but the last two records have the same reference number. I need my query to show the first 9 records + the record from the bottom two with the latest date (22/07/2015).

View 2 Replies View Related

Timesheet Table To Create Popup If Timesheet Entries Is Not Entered Day Before

May 24, 2007

hiya, just posted a message today.

Problem, ive got a work database which employees logon to and enter time against certain projects they have been working on. What i need is to somehow create some code that will look at each of the employees names and sum up there total time for the previous day. If this is less than say 6 hours of timesheets or even zero entries have been made, I want a pop up message to pop up as soon as they logon to the datatbase the next day and jsut mention they need to fill in there timesheets.

At the moment each person when they log on to the database has there name they logged in as, placed into a field (called "First Name") within form (called "Employee Startup Screen"). *** maybe use this as a way to identify who is logged on and when to run the code.***

Timesheet table has the following columns:
Employee; Date; ProjectID; Timespent

PLEASE help im a noob at this and have tried using some code on a query that sums up the previous days times filter on a employee. When the "Employee Startup Screen" opens it runs the following code

Dim internal1 As Integer

internal1 = Me.SumOfTimeSpent

If internal1 < 6 Then

MsgBox " Less than 6 hours have been entered " & Chr(13) & " into your timesheet for yesterday. ", vbCritical, Title1

ElseIf DCount("*", Me.SumOfTimeSpent) <> 0 Then

end if

End Sub

----------------------------


BUT it doesnt work if no entries have been made on the timesheet as the query result is blank.

ANY help would be muchly appreciated.

Thanks Keith

View 4 Replies View Related

Queries :: SELECT DISTINCT Not Removing Duplicate Records In Staging Table

Jan 29, 2015

I have a database with an import process which normalises incoming data and appends to various tables. No issues with that. I also have a function within that process which counts the number of new entries for a summary popup when the process has completed.This works by querying the staging table, prior to the append, into a recordset and using the .RecordCount to increment the count (multiple files can be imported at once so this effectively provides a running count, per file, to give a total for the whole import)

I thought it was working fine but this morning I noticed that the count which appeared on the popup was 1 greater than the number of actual new records. I checked the source files and noticed that, for whatever reason, there was a duplicate entry in there. So I presume that's why the count was out by 1.

There's no integrity issue in the main tables as the composite primary keys ensure that duplication shouldn't be a problem. Indeed, the record in question, duplicated in the source, appears only once in the main table post-import. So not too worried about that.

However, I need the count in the popup to be accurate (it tells the users how many new entries require further investugation). And what's puzzling me is that I use DISTINCT in the query, which I would have thought should eliminate any potential dupes in the recordset and thus provide the correct count. It seems it doesn't?

Code:
Public lngNewBalancesTBI As Long ' Defined in a separate module...
-------
Dim dbs As Database
Dim rst As Recordset
Dim strSQL As String

[code]....

Why the dupe, which is still present in the staging table, also makes it over to the recordset, even though I'm using DISTINCT?

View 14 Replies View Related

Simple Timesheet DATABASE

Jul 10, 2007

Hi, Guys

I'm building a simple time sheet database for a friend of mine.

I know that im going to have trouble checking there amount against the tax table and taking there tax out to finalise the amount they would actually get.

So basically im an intermediate access user, how would i get the database to do this when i press like a calculate tax button..???

Cheers
Tristan F

View 1 Replies View Related

Split Time Across Multiple Brands In Timesheet Database

Jun 21, 2014

I'm working on a database with a form input to record my time on projects at work. How to split End Time - Start Time among all brands that I've chosen for a line item?

[URL] .....

View 3 Replies View Related

Forms :: Timesheet Database - Combo Boxes In Header Autopopulate

Dec 16, 2013

I'm trying to create a timesheet database to keep track of employee hours worked. I have my tables set up as follows...

Employee_T
PK -EmployeeID
PositionTitle
Last Name
First Name
Employer

Projects_T
PK-ProjectID
ProjectNumber
ProjectName
WBS

Timesheet_T
PK-TimesheetID
FK - EmployeeID
FK - ProjectID
Sat
Sun
Mon
Tues
Wedn
Thurs
Fri
WeekEnding

My question is on my input form I want to have the user/employee pick his name once in a header combo box as-well as the week ending date and have it populate to every new record that user input (each employee can charge to multiple projects in a week so I want to eliminate the need for them to pick their name and week ending date everytime they select a different job charge.)

John Doe Week Ending 12-20-2013

M T W TH F
Landscaping 8 4 3 2 6
Roofing 3 5 2 1
Plumbing 1 4 1

View 6 Replies View Related

Queries :: Removing Grand Totals From Query Pivot Table

Jun 17, 2013

To keep it short and sweet, my query set up is: Employee, Team Name, and then I have the same field in the column as I do in the data and it presents pass/fail data. I have the data shown as a percent of the row so that there is a success rate shown but I want to remove the grand totals from the rows because it is obviously going to be 100% every time and it's unnecessary.

View 13 Replies View Related

Queries :: Timesheet Calculations - Round Up To Nearest Fifteen Minutes

Sep 2, 2013

I have a timesheet database, which has the exact start time and exact end time. I want to ignore this if it is five minutes either side of the half hour, and display the exact half hour, but otherwise want to round it UP to the nearest fifteen minutes.

For example:

Exact Start: 09:58:23 Displays as: 10:00:00
Exact Start: 09:42:16 Displays as: 09:45:00
Exact Start: 09:02:08 Displays as: 09:00:00
Exact Start: 09:07:01 Displays as: 09:15:00
Exact Start: 09:23:03 Displays as: 09:30:00
Exact Start: 09:33:00 Displays as: 09:30:00
Exact Start: 09:36:04 Displays as: 09:45:00

View 11 Replies View Related

Archive, Removing Records

Jul 5, 2005

hi

i have a form with various fields, on this form i have an archive button that places certain fields in an archive form. however this does not remove the information from the main form. pls see attached

any ideas, as some will know i'm a newbie

View 1 Replies View Related

Removing Outdated Records.

Sep 27, 2006

I have:

Database A with fax numbers:
Example:
- 1. John. W
- 2. Mark. Y
- 3. Sean .S

I exported to a dbf file to do some mass faxing and realised that Mark's fax number is no long in use. (error report by the fax software)

I can export the error report and save as dbf.

Is there a way to make use of this dbf to update and remove Mark's record from Database A?

View 1 Replies View Related

Removing Outdated Records.

Sep 27, 2006

I have:

Database A with fax numbers:
Example:
- 1. John. W
- 2. Mark. Y
- 3. Sean .S

I exported to a dbf file to do some mass faxing and realised that Mark's fax number is no long in use. (error report by the fax software)

I can export the error report and save as dbf.

Is there a way to make use of this dbf to update and remove Mark's record from Database A?

View 1 Replies View Related

Removing Duplicate Records... Help Please

Jan 3, 2008

Ok well I thought I was doing this right but it appears I have not. I am drawing data from two tables. Both of them related by the person's name. One table I am pulling the unique ID number, the other table contains the name. I have a PO (Purchase Order) field being pulled from the table that holds unique ID. Or lack there of, so I am pulling all the records that contain no PO number. However duplicate unique ID's are being pulled. The way my query is set up now is:

Unique ID Number
Name
Count (Number of Procedures)
Charges
PO Number - Criteria: "Is Null"

I have also right click in the table view area, in the properties I selected Unique values. I have to assume that this would have held back any Dupes from the output. However this is not the case. When I looked in the help files the only thing I could find was:

http://office.microsoft.com/en-us/a...0840151033.aspx
Quote: "If you want to see only unique values in a result set, you can specify that you want to exclude duplicates from the result set.

In the Database window, click Queries under Objects, click the query you want to open, and then click Design on the database window toolbar.
Right-click the background of the Diagram pane, then choose Properties from the shortcut menu.
Select DISTINCT values.
The Query Designer inserts the keyword DISTINCT in front of the list of display columns in the SQL statement.

Note If you use the DISTINCT keyword in Microsoft SQL Server, you cannot modify the data in datasheet view."

The problem with this is my properties box does not offer a Distinct Values option. So my question is. Is there an expression I can place in the Unique ID field that will exclude any duplicate records.

Sorry for the book
Sean

View 3 Replies View Related

Removing Duplicate Records With Macros

May 8, 2013

I currentlyt have a search form that searches criteria based on a textbox. After entering data a macro runs, and opens up a query with the results. After that query opens i have macro that runs a duplicate query off of the query initally opened based on the search results. What i would like to have is a macro that removes the duplicate records from the duplicate query and display the remaining records.

View 1 Replies View Related

Tables :: Removing Duplicate Records From One Table

Feb 18, 2014

I have a table with at least 13.000.000 records. There are many duplicates records... For example

ID Name Family mobile car number chassis Register_Year
1 Roy Jalbout 9999 123456/G ASF4546 2005
2 Roy Jalbout 9999 854658/G GRK554JFJD 2009
3 Tony Elishah 1234 854658/G GRK554JFJD 2012
4 Sam Markos 5478 854658/G GRK554JFJD 2014
5 Roy Jalbout 9999 123456/G ASF4546 2005

As you can see ID Number 2,3,4 have the same car but every one bought from another so it's not duplicates

The duplicates here is the ID's number 1,5. So how to remove the duplicates. I remember you i have at least 13.000.000 records. I try to make a query to find duplicates then i make a copy of the original table and than i should make a primary key then append the data from the original table to the copy table, but here i have more than one criteria

When I made a query to find duplicates the result was 680.000 records and every one have a minimum 2 duplicates an maximum 4 duplicates so it's about 2.500.000 duplicates records at least....

View 5 Replies View Related

Finding And Removing Records That Sum To Zero Based On Two Other Columns?

Apr 3, 2013

I have a dataset of about 70 columns but would like to remove any two rows that sum to zero (based on two columns) if the column "Units" are the same for the same "Bar code" thus to say "for the same 'Units' (for any two lines), check to see if their respective 'Bar Codes’ are the same and if so remove if their amounts sums to zero".

I have the following code which seems to be working but for relatively large data ( about 5k), it does not select all the data that meets the criteria:

Code:
SELECT *
FROM datatable
WHERE ((([datatable].[Unit] & [datatable].[Bar Code] & Abs([datatable].[Amount]))
In (SELECT datatable.Unit&datatable.[Bar Code]&abs(datatable.Amount)
FROM datatable
GROUP BY datatable.Unit&datatable.[Bar Code]&abs(datatable.Amount)
HAVING count(*)>= 2 and sum(datatable.Amount)=0)))
ORDER BY [datatable].Unit & [datatable].[Bar Code] & Abs([datatable].Amount);

identifying the bug in this code that makes it not pull all the data meeting the criteria.

See sample data below:

# Unit bar Code Amount
1. AAB Mac1 2.75
2. AAB Mac1 -2.75
3. AAB Mac1 1.24
4. AAC Mac3 35.00
5. AAC Mac3 -20.00
6. AAC Mac3 20.00
7. AAD Mac3 16.11
8. AAC Mac2 11.00
9. AAC Mac2 -11.00
10 AAC Mac3 12.05
11 AAF Mac3 -12.05
12 AAD Mac3 -16.11
13 AAC Mac4 35.00

I want to select records # 1, 2, 5, 6,7,8,9 and 12 since they are same units having the same bar code and their sums total zero.

View 6 Replies View Related

Queries :: Quotations Database - Queries Showing Too Many Records

Jun 25, 2015

I have a database that is used to create Quotations. After all of the information is entered the queries that hold the calculations must be run. I have lots of calculated that rely on other calculated fields. When I need to Sum all of the calculated fields in one field I must create a new query. I currently have a QuotationID, PartID, and MetalID all linked together. The first of the calculations are done per Metal, and these are working fine. I run into a problem when the calculations need to be done by part. My Queries are creating a record for every Metal and this is throwing all of my numbers off.

View 1 Replies View Related

Listbox/Search Isnt Removing Still Displays Deleted Records

Jun 21, 2005

i have a form porblem. I have a search form embedded onto my main form its really a listbox that when i click the records in it they display the record.

prob;em is that when i delete the record it still shows in the listbox

View 1 Replies View Related

Queries :: Match Up Two Tables - Removing / Changing Numbers

Jul 12, 2013

Okay, this one should be simple and can be solved in one of two ways. I have two seperate tables with a 12 digit identifying number that is ALMOST exactly the same in each. I am trying to match up these two tables, which works amazingly well, except for the occasional case where the 12 digit ID (which is called API) ends in 01, instead of 00. The last two digits do not make a difference at all, but in one table it will end in 00 and the other it will end in 01, even though they are the same record.

Basically, it looks like this...
Table 1---------------Table 2
541236554700-----541236554700
541236123700-----541236123700
443231246700-----443231246701

So basically, in my final query, the last entry will not show up since these two are not related by this API (ID) number. Any way to either replace the 01 on the end with 00... OR to remove the last two digits?

View 2 Replies View Related

Queries :: Display Last 100 Records Entered In Database

Jul 15, 2014

I am looking for a way to either display through a query with an expression or any other alternative that someone may have to display the last 100 records entered maybe based on date entered or something.

At the moment i have a query and report going form start date to end date but would also like a query/report that will just show me the last 100 records entered.

View 10 Replies View Related

Queries :: Tracking Database - Retrieve Top 100 Records

Jul 24, 2013

I am working on a project where I am creating a database that tracks open orders (old and new orders that still need to be billed but haven't been billed for one reason or another).

I have my "Master" table built and now I need to create 2 queries, one query retrieves the Top 20 orders based on value and that are older then 30 days and the second query is to retrieve the Top 100 orders based on the same criteria but the Top 100 query should not include the orders that appear in the Top 20 query.

My Top 20 query is below

SELECT TOP 20 MASTER.COMBO, MASTER.[Customer Name], MASTER.Status, MASTER.CCD, MASTER.Area, MASTER.[Order Type], MASTER.[Order Value], MASTER.AGE, MASTER.ANALYST, MASTER.COMMENTS
FROM MASTER
WHERE (((MASTER.AGE)>=30))
ORDER BY MASTER.[Order Value] DESC , MASTER.AGE;

I have tried multiple ways to do the Top 100 query and exclude what is returned in my Top 20 query but so far no success.

View 10 Replies View Related

Queries :: Removing Text From String Using Replace Function And Wildcards

Apr 25, 2014

I have a list of consumables;

Syringe 50ml
Syringe 20ml
Syringe 5ml
Syringe Cap
White Needle

I want to remove only the number and the ml part from the list, so I would end up with;

Syringe
Syringe
Syringe
Syringe Cap
White Needle

If I use

PHP Code:

Replace([DrugNameVial],"50ml","") 

I get the desired result for the 50ml syringe size.

I have tried every possible combination of "**ml", "##ml", "Like [0-9]ml all with no success.

How this can be resolved without having to individual enter each syringe size "5ml", "20ml" etc

I can't even just take the text from the right till the first space as this would lead to problems with other consumables in the list.

View 5 Replies View Related

Queries :: Stakeholder Database - Update Multiple Records At Once

Apr 15, 2015

I am building a stakeholder database in Microsoft access 2010 and I want to be able to say that a stakeholder attended an event. I have managed to do this but I can only say that one stakeholder attended an event at one time. This is quite a problem as there can be up to 800 or even more stakeholders attending an event so to go through and click each one would be very time consuming.

My current set up is I have a stakeholder table an events table and an event attendance table. It all works fine apart from only being to edit one record at a time. I have tried update queries with no success, I can attach the database but would need to remove the data for data protection reasons.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved