Results 1 to 4 of 4
  1. #1
    Blankman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    2

    Using Query to Flag changes in crafts

    I am currently trying to audit employee craft changes over a period of time. I have been able to pull all the data into a pivot table how ever the query is picking up the employee name and counting them for every time sheet and is not separating the craft type by time sheet. Any idea on how I would be able to have a pivot set up so that the employee name is linked with the craft and that specific time sheet?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Please tell us in plain English what this means? Perhaps an example would help.
    employee craft changes over a period of time
    Seems you have

    Employees who build crafts. Employees complete time sheets. Crafts are associated with a CraftType.

  3. #3
    Blankman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    2
    Quote Originally Posted by orange View Post
    Please tell us in plain English what this means? Perhaps an example would help.


    Seems you have

    Employees who build crafts. Employees complete time sheets. Crafts are associated with a CraftType.
    The craft is the employee's description such as welder or foreman.
    I have uploads that are sent in by inspectors which give me the employee's time as well as what they are classified as. I am wanting to find out if any of the employees have had their crafts changed since the beginning of the year. (There are over 3000 employees BTW)

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    So, Inspectors send information about Employee's and their Time sheets. Included in the information is the Employee's current craft (position/occupation??). The Time sheets include relevant Dates. You want to have a query to identify those Employees who have changed crafts since the beginning of this year.

    I see the following set up (first approximation)

    tblEmployee
    EmpId
    EmpFname
    EmpLName

    tblTimesheet
    TimesheetID
    WorkPeriodStart
    WorkPeriodEnd
    HoursWorked
    CraftID
    EmpID_FK


    tblCraft
    CraftID
    CraftName

    1 employee ----has many Timesheets
    tblEmployee--->tblTimeSheet

    tblTimesheet has field CraftID_FK which is a foreign key to CraftID in TblCraft to resolve CraftName

    You can get those EmpIds with more than 1 craft since the beginning of the year with a query long these lines

    Code:
    select empid_fk as emp, count(craftId) as If_greater_than_1_MeansChanged from
    (SELECT tblTimesheet.empid_fk, tblTimesheet.craftId
    FROM tblTimesheet
    GROUP BY tblTimesheet.empid_fk, tblTimesheet.craftId) 
    group by empid_fk
    Good luck.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to flag a warning
    By SamCrow in forum Queries
    Replies: 3
    Last Post: 01-12-2014, 10:52 AM
  2. Date flag
    By glasgowlad1999 in forum Forms
    Replies: 5
    Last Post: 02-15-2011, 06:13 AM
  3. flag in access
    By bold01 in forum Access
    Replies: 9
    Last Post: 02-03-2011, 11:08 AM
  4. Query to flag daily change in order status
    By Relyuchs in forum Queries
    Replies: 1
    Last Post: 01-21-2011, 02:53 PM
  5. Flag A Data Block
    By JohnBoy in forum Programming
    Replies: 7
    Last Post: 06-29-2010, 01:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums