Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    Texas, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I was asked to create a database where staff can enter/update their hours for the month for different projects. I have my tables all normalized.
    tblEmployees: empID (autonumber), EmpName and EmpNo
    TblProject: projID (autonumber), ProjNo, Description
    TblProjHrs: DataID (auto), projID (from tblProject), empID (from tblEmployees), Hrs, txtMonth and Comments
    I created a continuous form which allowed users to choose the project number(s) using a drop down box then enter their hours. My manager isn't satisfied. He wants a form where all available projects are listed and users only have to input their hours.

    To do this, I think I will have to create an unbound form and physically add the 29 labels that show the projects' names. I will have 29 text boxes for the hours and 29 for any comments. I will use a dropdown box for the user to select his/her name, and use dlookup to retrieve any data that's already been entered in tblProjHrs.

    To save the data, I'll use ADO (I just switched to 2007 from 2000, so guess I can still use ADO) to update the records in tblProjHrs by deleting any current records for the employee then add the new records. This doesn't sound efficient to me, but I can't think of another way to determine if only the hours were changed for current records or new hours were entered on a different project.

    Before I get started, I'd like to know if I'm headed in the right direction.

    I will appreciate any insight you can provide. Thanks.
    Ela

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    That sounds like a good idea. (The overhead of deleting records and adding new ones is small)

    Alternatively, you could create a record for each project for the specified employee and month in TblProjHrs; the form can then be bound to a query that selects the records for the specified employee and month. On the one hand, this is easier to set up, on the other hand it's wasteful since there'll be unused records.

  3. #3
    New Lounger
    Join Date
    Mar 2002
    Location
    Texas, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='790620' date='25-Aug-2009 13:40']Alternatively, you could create a record for each project for the specified employee and month in TblProjHrs... On the one hand, this is easier to set up, on the other hand it's wasteful since there'll be unused records.[/quote]
    Thanks for the suggestion. I believe I'll take the easy way out since it'll make it easier to add new projects. Using this method, I think the users might be able to add new projects without me having to revise the form.

    You're the best!

    Regards,
    Ela

Posting Permissions

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