Results 1 to 4 of 4

Thread: Update Table

  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update Table

    I have a table that includes one record for each employee for each day of the year. When I need to add a new employee to the database, what's the best way to add the employee to this table? (I have a separate user table to which the aforementioned table is related on the userid field.)

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Update Table

    You neglected to tell us the version of Access you're using, but in any version this is bad table design. Why do you want 366 records for each employee? Is this by any chance a timekeeping database?
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update Table

    Using Access 2000. Yeah, I didn't feel too sure about this design, but it was the only way I could find to do what I wanted.

    Yes, it is timekeeping--it will be used to log the time in and time out of all employees as the arrive/leave. Therefore, I created a table that had each employee listed for each date and then built a form on that. But couldn't figure out how to add new employees. Could you suggest how I could do this and/or suggest a better table structure?

    (BTW, thanks for all your great help on this and previous posts.)

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Update Table

    Have a table for employees, as I assume you do now. Then have a table that holds a record for each employee with the employee ID, the date, the login/logout time, and a field to tell you which it is. A variant of this would be to have a login time and a logout time in the same record. If your employee logs out for lunch, you'd have two records per day with the latter design, 1 for pre-lunch and one for post-lunch, assuming they came back. Or if they logged out for a doctors appointment, same thing. That design it might be easier for you to work with. You only add a record to the second table when you need to, not when the employee is hired. So for days the employee didn't work, you don't have a record. If they didn't come back from lunch, you don't have a record.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •