Results 1 to 2 of 2
  1. #1
    DrMann is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2014
    Posts
    3

    Look up a field name by it's value then changing a corresponding field value

    I am creating a form that will allow an employee to track the amount of time spent on a specific job. I may be over thinking it because I’ve thoroughly confused myself.



    Here’s what I have:

    A table (Orders) containing information for multiple Jobs (primary key field - Job Number). Each Job has up to six sub-jobs (field - Job 1, Job 2, etc.). Each sub-job has the amount of processing time (field – Job 1 Hours, Job 2 Hours, etc.).
    I want to create a form where the employee can enter the sub-job number with the start/stop time. The database would then search the table for the record and update the appropriate hour’s field.
    Ex.
    Sub-Job – 12345.3
    Start Time – 2:15PM
    Stop Time – 4:15PM

    Sub-Job “12345.3” is in the “Job 2” field of Job Number “12345” so “Job 2 Hours” field would get updated to add 2.00 to the existing value.
    The code would first have to locate which field the sub-job was in then update the corresponding hours field.

    Any help would be appreciated.

  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,849
    Perhaps if you consider an Employee works on a Job which can be broken down into Tasks. The Employee records Time worked against tasks. If Many Employees can work on the same Task, you need a way to record EmployeeWorkedHoursOnTask

    Job--->Task--->EmployeeWorkedHoursOnTask<----Employee

    tblJob
    JobId
    JobName
    other Job info

    TblTask
    TaskId
    JobIdFK
    TaskName
    other TaskInfo

    tblEmployeeWorkedHoursOnTask
    EmpIDFK
    TaskIDFK
    WorkDate
    StartTime 'can determine Hours worked from StartTime and EndTime
    EndTime
    Other info

    tblEmployee

    EmpID
    EmpFName
    EmpLName
    other EmpInfo

    Just some thoughts for consideration based on your post.

    Good luck.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-17-2015, 10:18 AM
  2. Changing a Field Format
    By lwinford in forum Forms
    Replies: 3
    Last Post: 04-23-2013, 01:18 PM
  3. Replies: 2
    Last Post: 01-31-2013, 07:44 PM
  4. Changing value of a field after an event.
    By mikethebass in forum Access
    Replies: 1
    Last Post: 06-16-2010, 04:42 PM
  5. changing a records field value
    By tubar in forum Queries
    Replies: 3
    Last Post: 07-06-2009, 07:36 AM

Tags for this Thread

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