Results 1 to 4 of 4
  1. #1
    Wombat is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    33

    Continuous Subform that retrieves data from one table and saves to a different table

    I have a Traits table that has fields TraitKey and Trait and I'm looking for the subform to show one record for each trait so that I can give the employee a score for each trait.

    I'm trying to save that score in an EmployeeTraitScores table that has the fields EmpID, Trait, Score.



    If I bind the subform to the traits field, the continuous form shows each one properly but then I don't know how to save to the scores to the EmployeeTraitScores table.

    If I bind the subform to the EmployeeTraitScores table then it can save a record but I can only get the Dlookup to show the first trait.

    Does anyone have any ideas?

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Your subform has to be bound to the EmployeeTraitScores table. The Traits table is just a lookup.

    How are you inserting the data records into the EmployeeTraitScores table? Is there a fixed number for each employee (i.e. one for each trait?), and how are the Scores being entered? From what you said, all you are using the DLookup for is to return the text equivalent of each Trait_ID, so the user can see it, but not to store it anywhere - is that correct?

    Can you provide more info, please?

    John

  3. #3
    Wombat is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    33
    There is one score and a Comment for each trait for each employee but some employees have more traits than others (I need to filter by supervisor or hourly). The score is a Value List (1-5).
    I was attempting to use a Dlookup as the recordsource, which, of course, failed because it only returned the first one.

    So binding to the EmployeeTraitScores table makes sense so that my score and comment can be saved, but then how do I list the traits? I guess I could just make a supervisor form and an hourly form and hard-wire it, but it seems like there must be a way to accommodate a varying number of traits on one form.

  4. #4
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    Your EmployeeTraitScores table also needs to have a field for the Trait_ID, so that each record in it will tell you:

    This Employee A received a score of B for Trait C. Your data entry sub-form could use a combo box to list the traits (filtered according to supervisor or hourly), and store the TraidID into the table. The users do not need to see the Trait_ID in the combo box list. Reports or other forms which need to display the trait text could have a query as the record source (You will amost certainly need an Employee-EmployeeTraitScores-Traits query somewhere).

    HTH

    John

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

Similar Threads

  1. Replies: 13
    Last Post: 02-26-2012, 08:28 AM
  2. Replies: 8
    Last Post: 09-26-2011, 06:38 AM
  3. Replies: 2
    Last Post: 08-01-2011, 11:35 PM
  4. Replies: 0
    Last Post: 05-12-2010, 10:08 PM
  5. Replies: 9
    Last Post: 02-19-2010, 12:07 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