Table Stucture Help - Tracking Varying Time Periods

Sep 10, 2007

Hello,

I'm having a hard time trying to figure out how I should go about designing the table structure for the hours tracking for the database I'm working on. Basically, I have a table with projects (tblProj) that I need to track the number of labor hours worked per month. The problem lies in the fact that each project could have varying time periods, anywhere from less than a year to more than a year and can start and end at any time of the year.

I was thinking of creating a second table (tblProjHours) to store the hours for the project but I'm not sure what the most efficient way of doing this would be. My idea was to create a table as follows:

tblProjHours
ProjHoursID (pk)
ProjID (fk)
BeginDate
EndDate
Month1
Month2
Month3, etc....

I would create a large number of fields/columns, something like Month1 to Month36 just to make sure I have enough months to enter in the hours. This is of course inefficient since some projects would be way shorter than the maximum allowed months set by the table structure and there is always the possibility of surpassing the maximum allowed months based on the table structure. I was wondering if someone had any better ideas on how I should pursue the design. Thanks in advance!

TheMach

View Replies


ADVERTISEMENT

Table Stucture

Aug 16, 2006

I am designing a database (just on paper at the moment). My knowledge of databases and access is of an okay standard but nothing more so feel free to point out my stupidity.

I have a problem with my first draft. Part of the database concerns itself with school pupils and mentors that at some point spend time teaching the pupils. The database needs to keep a record of the amount of time each mentor spends teaching and how much time each pupil has spent being taught.

Every time a Mentor teaches one or more pupils they fill out a form with their name, date, the details of the pupils that they taught and how long they spent with each pupil.

I originally had 3 tables:

Pupils(PupilID, Fistname, Surname, DOB)
Mentors(MentorID, Firstname, Surname)
Contact(MentorID, PupilID, TimeSpent, ContactDate)

I found what I think is a problem in that If I have MentorA and MentorB who together teach Pupil1 for 2 hours on the 25th November 2006 my Contacts table would look like this.

A, 1, 120, 2006-11-25
B, 1, 120, 2006-11-25

This does fine for recording how long each Mentor has worked:

MentorA - 120 min
MentorB - 120 min

However I have a duplication of - Pupil1, 120, 2006-11-25

When looking to see how long Pupil1 has spent being taught the data tells me 240 min. This is not correct. It is vital that the database can tell exactly how long each pupil is involved with a Mentor.

Does anyone have any ideas or suggestions.

View 3 Replies View Related

Group Data Into Arbitrary Time Periods

Oct 18, 2006

I am new to Access and would be very grateful for some adivce on setting up a query.
The data in the table below comes from a photon counter. Both fields are numbers although TIME actually represents seconds.
I need to be able to group the DATA field by arbitrary TIME periods. e.g. to divide the table up into bins of, say, 8.7 seconds length, showing the total accumulated in the DATA field for each successive period of 8.7 seconds.
The tables are about 300,000 records long.
Any help would be much appreciated.

Thanks,

TIME - DATA
285748175.864557 - 100
285748175.874556 - 100
285748175.884556 - 0
285748175.894557 - 100
285748175.904557 - 0
285748175.914556 - 200
285748175.924556 - 300
285748175.934556 - 0

View 7 Replies View Related

Counting Records For Specified Time Periods In Multiple Rows

Dec 14, 2004

I have a MS Access database that tracks when packages are received, returned, etc from different agencies. I need to create a query or report that shows how many packages were received, returned, etc PER MONTH, PER AGENCY. I was able to create a query that listed all the "Date Pkg Rec'd" dates for October (Between #10/1/2004# and #10/31/2004#), but I don't want a listing of all of the dates, rather a total of the records within those timeframes PER AGENCY. For example, APHIS 10, FAS 3, etc.

The other problem I have is I need this done across many columns without excluding those records without an October date (for example) in them. For example, I could have a "Date Pkg Rec'd" date in October, but not an October date listed in the "Date Pkg Returned" column.

Basically, I need the simpliest way to generate monthly "record totals" for several fields.

Any help would be appreciated.

Thanks.

View 1 Replies View Related

Modules & VBA :: Calculate Time Periods Based On A Given Tariff

Mar 25, 2014

Suppose that you want to make a formula which will calculate time periods based on a given tariff. To be more precise.

Suppose you can "get in" somewhere, entrance is $2.
You are free to stay there, without additional charge, for 5 days.
Then, for the next 5 days, the charge is $1 per day
The next 7 days, the charge is $1.5 per day
Thereafter, $3 per day.

In this scenario, we can make a query, we use datediff function to see the number of days between "gate in" and "gate out".

The problem is that the tariff is not very simple and the query gets to big and difficult to control with lot's of "iif" and may be I need to make more than 4 queries and union select and so on.

I tried to find in the docmd if there is any suitable function that I could use.

View 7 Replies View Related

Time Tracking System

Apr 24, 2006

I have a time tracking system where users can clock in and clock out. I want to have an error message when they clock in and then accidently clock in again. Therefore, they can only clock out after they have clocked in. The data goes into the table called "Timeclock Table". The fields in that table are SSN, Clock-In, Clock-Out, and TimeStamp. the clock in and clock out are check boxes. can you guys help me??????

View 1 Replies View Related

General :: Tracking Time Off From Work - Weekly Schedule?

Dec 10, 2013

I have been tasked at my work to create a database for tracking time off from work. I have built several databases in Access 2003 and have now transitioned to 2010 and it is seems to be going well. My past databases have been rather simple data in data out not really that big of a deal. However on this database they need a report that will show them a week view that shows them all the employees regular days off and any additional time off they have schedule in that week.

I have an employee info table that has employee basic info, Emp name, Emp number, Work Week code (which identifies which days off the employee has) Hire Dates (for seniority sorting) and then I have 7 fields listed as D1, D2, D3 and so on until D7 (I will try to explain these fields later).

I have another table (Time Requests) that has 3 fields, Date, Emp number, and Time code (which identifies why they are off work or unavailable to be assigned).

The last table I will refer to has 7 fields, they are Date1, Date 2 – Date7

I now have a form. This form has the 7, fields Date1, Date2 – Date7.

On my form Date1 field is updated by a manager with a date that is a Sunday then Date2 = [Date1]+1,
Date3 = [Date1]+2 and so on until I have all 7 fields showing date from Sunday – Saturday.

These fields are lined across the top in a vertical direction positioned above a subform of the employee info table. So directly below the 7 Date fields are the D1, D2, D3, D4, D5, D6, D7 fields then to the right is the Emp name and Emp number, This gives me a Week view of who is working.

I have been able to get the D1, D2….. fields to show their respective Work Week codes by writing very simple “If Then” statements . So here is where I AM STUCK…When I am showing this week view how do I get D1 –D7 to identify what date they are supposed to be in reference to Date1 – Date7 then compare themselves to the table “Time Requests” to see if they have a match and then set the value of D1, D2 …. to the “Time code” in that table. D1 – D7 need to auto populate and do this for about 50 employees.

Here is a screen shot of what I have so far and where I am stuck: [URL] ....

View 2 Replies View Related

Create A Database For Tracking Time Off From Work And Print A Weekly Roster?

Dec 11, 2013

I 'm trying to create a database for tracking time off from work and print a weekly roster. I have built several databases in Access 2003 and have now transitioned to 2010 and it is seems to be going well. My past databases have been rather simple data in data out not really that big of a deal. However on this database they need a report that will show them a week view that shows them all the employees regular days off and any additional time off they have schedule in that week.

I have an employee info table that has employee basic info, Emp name, Emp number, Work Week code (which identifies which days off the employee has) Hire Dates (for seniority sorting) and then I have 7 fields listed as D1, D2, D3 and so on until D7 (I will try to explain these fields later).

I have another table (Time Requests) that has 3 fields, Date, Emp number, and Time code (which identifies why they are off work or unavailable to be assigned).

The last table I will refer to has 7 fields, they are Date1, Date2, Date3, Date4, Date,5 Date6, Date7

I now have a form. This form has the 7, fields Date1, Date2.... Date7.

On my form Date1 field is updated by a manager with a date that is a Sunday then Date2 = [Date1]+1,Date3 = [Date1]+2 and so on until I have all 7 fields showing dates from Sunday - Saturday.These fields are lined across the top in a vertical direction positioned above a subform of the employee info table. So directly below the 7 Date fields are the D1, D2, D3, D4, D5, D6, D7 fields then to the right is the Emp name and Emp number, This gives me a Week view of who is working.

I have been able to get the D1, D2.. fields to show their respective Work Week codes by writing very simple If Then statements . So here is where I AM STUCK, When I am showing this week view how do I get D1 - D7 to identify what date they are supposed to be in reference to Date1 - Date7 then compare themselves to the table Time Requests to see if they have a match and then set the value of D1, D2 . to the Time code in that table. D1 - D7 need to auto populate and do this for about 50 employees.

View 2 Replies View Related

Queries :: Tracking Time Spent On Customers Records Based On Date Of Entry

Apr 17, 2014

I have two tables, One table containes customer name, etc., tblcustomers the other table contains the tbltimelog, log of activity start time end time. No issues. I want to generate a form based on the dateofentry for the time record. I am not able to get a summary lets say I spent 20 hours on ABC and 20 hours on CBS. If I spent 3 different days on ABC and 6 different days on CBS it will not add them together it will list it ABC 3 times and CBS 6 times. I have tried the distinct function but it doesn't work because the date is distinct. Is there a way to do this as an SQL or whatever. Thinking I could just create a new table and calculating the totals but that seems to be a waste.

View 3 Replies View Related

General :: Tracking Changes To Table

Jun 14, 2013

I'm doing a database that tracks customer projects and orders.

The Header table contains all the Customer and Project details like customer name, contact details, project leader, etc.

A second table BOM contains the customer orders for a particular project.

I need a way to track changes or revisions to the BOM. It happens when a customer makes changes on their orders like quantities, etc.

View 7 Replies View Related

Create A Tracking Table?

Nov 4, 2013

I have my database and my form all created and working. Reports and everything are in place. But we need to have a record of what changes have been made. Essentially what I want to make is a table that is essentially a log of all the changes that have occurred.

What I have is essentially a time clock database. So when someone enters our facility the guard will check them in and out. What I want is a list of all the ins and out for a day. So it will be a running list. Then I will create a query to return results for a report. But where I am having problems is creating a table that will house this data. So out of my main table I want a child table that will have certain data fromt he parent table. Mainly the time in and out along with the name of the person. There will be multiple repeat data entries in this table and I am ok with that.

View 14 Replies View Related

General :: Tracking Recurring (Yearly) Training - Table?

Feb 24, 2014

I am trying to track a yearly training in Access 2010 but am not quite sure how to accomplish it. The training originally was just a one-time thing, due within two weeks of a new hire's start date so I currently have it displayed as three fields in my employee table (Due Date [Calculated], Completed [Date/Time], Paid [Yes/No]). Now, employees will be required to complete this training every year (beginning January 1st, not from employee's start date) and I don't know how to accomplish the tracking it.

I need to keep each year's completion date and whether or not the employee was paid. Currently, the "Paid" field is linked to a query that populates a list of employees that have not completed the training. If the "Paid" Yes/No box is unchecked, the employee's name will be listed in the query; once I check the Yes/No box then the employee's name is removed.

What would be the easiest way to track this training for each year? There are several other training that I am tracking but are one-time only events; these too are separate fields in my Employee table.

View 1 Replies View Related

Query With Varying Number Of Parameters

May 19, 2006

Greetings,

I am trying to write a parameter query ... I have multiple fields the users *could* search, but they may want to search only one, and I am having a struggle figuring this out.

Ex. fields to search are Gender, Age, Date, etc., and I have created a parameter query that includes parameters for each of these fields. However, if I want to see all the females, thus leaving the other two parameters blank, I have no records in my result set. Clearly, I am doing something wrong -- I have searched the forum extensively before posting.

Thanks in advance, I am sure I am being simple and missing somethign....

View 2 Replies View Related

Export A Field With Varying Space

Dec 4, 2007

I have a query that I export to a text file with fixed width settings.

For one particular field that had only been one character and 5 spaces I used PGM: " " & [ProgramCode] for my field. The recipient of the export file requires that this field be 6 spaces long and leading spaces fill in any unused field.

Now, one of the records for this field will be 2 character so the way it is now will cut off the leading character. How can I write this to add leading spaces until it reaches 6?

View 1 Replies View Related

Varying Decimal Length On The Form

Feb 6, 2006

Hello,

One of the items on my form has a value of varying length (decimals). My query is picking up the complete value but the field displays only 2 decimals. The field property is set to
Format = ##,##0.00###
Decimal = Auto

If i click on the field, it shows me the correct value e.g. 0.0001

How can i display the complete value on the form.

Thank you.

View 3 Replies View Related

Tracking 250 Pieces Of Data Per Client. Table Structure Help Needed.

Mar 12, 2006

hi everybody,
great resource you have here! my employer is tracking around 250 pieces of data for each client at our facility. i am making a new access system based on their existing mysql database and web front end. before i start messing around with forms and reports, i want to see how well this existing structure will work in access, and what kind of approach i should take. i am a newbie with access, but lots of experience with asp/mssql/php/mysql. making web forms is so time consuming that i figured i would be best off moving the whole thing to access and starting from scratch.

client information is stored in eight tables. each table has around 30 fields in it. the first table has a primary key autonumber, and the other seven tables have foreign keys with unique constraints that point back to the first table. that is, for each client record in the first table, there can only be exactly one corresponding record in the other tables.

i did some data massaging, and got the eight client tables into one big table, but the resultant table has almost 250 fields in it, and access doesn't seem to like working with tables that big. so i am thinking that it is best to leave the eight tables separate, but linked in one to one relationships.

i was kind of ideally visualizing a form with eight tabs so that i could edit/update all of the information from the eight tables rather seamlessly.

my question is: what approach to table structure will best suit my needs, and what approach should i take to add/update/delete the info with forms? will i need to do vb for this? any good one-to-one example databases anybody could point me at?

thanks a million,
harry doyle

View 1 Replies View Related

General :: Database Design - Stock Tracking / Set Up Table For Each Location

Sep 10, 2012

I am planning my new DB and am contemplating the best design. It will be used for warehouse stock rotation and control of pallets. I want to track each pallet (product/time in/time out etc) to each pallet space within the warehouse. There are a total of 400 pallet spaces or 'locations' as i will refer to them as.

Now, would it be possible for me to have a table set up for each location? Will access object to having 400 tables in my data base?? Is there a limit?

View 1 Replies View Related

Forms :: Choose Varying Number Of Subforms

Jun 23, 2015

I am designing a data-entry system in Access 2003 for a clinical case-reading study. The questions that the case readers have to answer are divided into modules, and different batches of records use different modules, but all batches use a core module which includes identifying information and a set of questions that apply to all cases. The modules can include anywhere from about 15 to 60 questions. Some of the modules have been written, but the idea is to create new modules as the need arises. The data will be exported to an Excel spreadsheet for analysis. There is no need to plan for reports and this isn't really a relational database.

The problem is to allow the reader to enter data for the relevant modules, sometimes one, sometimes four or five or more.

I have created a main table for the core module and a form to go with it. I’m assuming I need to create a separate table, related to the main table, for each module and an accompanying subform for each table.

How do I create a menu system that will allow the case reader to choose only the subforms needed for a particular record?

View 4 Replies View Related

Queries :: Using Same Field Multiple Times Under Varying Criteria?

Dec 30, 2014

Preamble edit: I'm running Access 2003.

I have two tables, Students and AttendanceRecords.

Students just has studentID and studentName

AttendanceRecords has AttRecID, studentID, presence, thedate

I'm looking to create what looks like an Excel grid, with the last 10 days as columns and the student names as rows. All the cells in middle will be filled with the values of 'presence' for that student/day (e.g., P for present, A for absent).

Here's something I'm currently considering.

-I could make 10 queries, each using LEFT JOIN to connect studentName with presence & thedate on studentID, varying the 10 queries only in that 'thedate' will have a criteria of Date() -1 , Date() -2 , etc.
-If I'm understanding it correctly, I'll then have 10 tables, each containing 3 rows -- student name, presence, and the date (with each table having only 1 date repeated throughout).
-I could then join those 10 queries together on studentName, theoretically resulting in 1 big table with all the student names and the corresponding presence values for the last 10 days

If I do that, I could make a form in Continuous view and have each row show the studentName and 10 text boxes closely bunched up with presence values.

That seems very inefficient? Making 10 queries separately and then manually merging them seems redundant.

Also, now that I think about it, will the final product end up being read-only, or if the user changes one of the presence cells will it update the corresponding record in AttendanceRecord?

View 3 Replies View Related

Reports :: Varying Images And Logos In Report Header

Aug 2, 2015

I create several reports for several different companies. Report data is the same but the report header data changes based on the company selected. All works well until I attempted to add their individual logos. I have tried many of the suggested methods both here and elsewhere to set the image path in Image.picture and image.control source. But I get "windows can't open file". Access 2010 on Windows10 insists on using the insert picture window when i select an image control. There is a drop down in the property sheet. I've gotten it to work a couple times but then its gone after restart.

The header data comes from a table [Company] which has the fields - name, addr, phone, path to image, and active(yes/no)

View 3 Replies View Related

Work Periods

Nov 1, 2007

HI All

I have a question that I just cant seem to get my head around....so I thought I'd pick your brains!

I have a table that has DriverID, Date, Work, Sleep, Rest. As you can imagine, this records their hours of work, sleep & rest.

Now with new fatigue management laws in Oz, we need to find out if they're working for more than 168 hours in a 14 day period.....

My thoughts are, create a query that runs through every date of the year, then counts forward 2 weeks, sums the WORK hours and only displays anything over 168 hours??? Is this correct? Would that not simply die ? Considering we have about 30 drivers to run through?

View 7 Replies View Related

Modules & VBA :: Control Height Of Multiple SubReports With Varying Content On Report

Jul 8, 2013

I am working on a report that will have 16 sub-reports, one right below the other. Because of the complex nature of the calculations in the groupings it seemed easier to "build" the report using vba rather than using the report's built-in grouping ability. The issue I am running into is that there seems to be no simple way to control the height of the sub-reports. I had hoped that setting "can grow" to yes would change the height of the sub reports and move all subsequent sub reports down (Allas)

As an alternative I thought too that I might be able to set the height of the sub-report control, which would make for a tricky but not impossible bit of programming, but (Again allas) I can't seem to find a reasonable way to determine the required height of the sub-report's control.

View 3 Replies View Related

Automate Holiday Periods

Jan 25, 2006

I have read more post than i care to think about but I can't stil get my head round the following problem.
I have created a database (with this forums help) but I am stuck on the following query/form/vba etc....

Our staff holidays run from 01/05/05 until 30/04/06 and i have a query that calculates what holiday entitlement staff are due from 01/05/05 on a daily basis up to 23 days worth of hols ending on 30/04/06, but I can't work out how to set next years holiday period 01/05/06 - 30/04/07 without changing the form manually, is there a way for it to auto update??

View 2 Replies View Related

Date Periods In Query

Jul 31, 2005

I am tyrying to get my query to analyse the last three months of data but typing the following in the criteria section under Potting Date
Date()-90

An error is occuring.

Can anybody assist with this problem, I think I am writing the wrong thing

Regards Karen

View 6 Replies View Related

Import Text File / Multiple Lines And Varying Delimiters / Size To One Record

Aug 22, 2012

Using MS 2007, I have a 200 text files exported each day from another application that has two different types of lines (see below). I would like to import each text file in to a database as a single record.

Text file example (text.txt):

R111 WC 8/21/2012 7:00 Doe, John doej 10110110

First Question? Y
Second Question? N
Third Question? Y
...
Seventeenth Question? 10

As you see, I have the first row with multiple fields, but the next rows I have a question and an answer.

I would like to have this data imported as shown in the attachment. Example.zip

Most answers I see are for either multiple lines (same data and sizing). I am not sure how to handle several different lines with that vary in size and delimiters.

View 5 Replies View Related

Filtering Specific Date Periods

Oct 29, 2006

Hi all!

I want to add a function to a form that filters records from a specific date period.

Each record has a field containing the date the record was added.
Example: I want to show the records added between 15.09.2006 and 10.10.2006.

Furthermore, the from and to date must be defined in textboxes, and the filter initiated with a button.

I need this functionality on a continuous form and in a report. How do I achieve this?

View 14 Replies View Related







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