Results 1 to 4 of 4
  1. #1
    heynay01 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    9

    IIf statement based on multiple fields and need to set up table?

    I have a database where I transfer data from Excel sheets into for the purpose of tracking quality control reports scores and comments. The data that I have pulled into my table include: Consultant, Score (the numerical value), and a bunch of comments and other fields.



    The problem is that the consultants fall into 1 of 3 job categories (Technical, Sr, Regular), and each job category has its own rating scale for Exceeds, Met, Partially Met, Did Not Meet. I need to figure out how to correlate the rating scale with the consultant's job category andthe QC score.

    I'm at a loss for an IIF/AND statement for a query that will check job category and score and return the correct rating (probably not the best way to do it anyway ), or how to create a table to put the range of scores in and join in a query.

    Technical (job category)
    (rating) (score)
    Exceeds = 96-100
    Met = 93-95.99
    Partially Met = 89-92.99
    Did Not Meet = <=88.99

    Sr.
    Exceeds = 93-100
    Met = 90-92.99
    Partially Met = 87-89.99
    Did Not Meet = <=86.99

    Regular
    Exceeds = 91-100
    Met = 88-90.99
    Partially Met = 85-87.99
    Did Not Meet = <=84.99

    Any help, insight, suggestions are greatly appreciated!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I would probably have a table with fields

    JobCategory
    Rating
    ScoreLower
    ScoreUpper

    so an example record would be

    Technical
    Exceeds
    96
    100

    That makes if fairly simple to find the rating for any combination of category and score. The criteria in a DLookup or query would basically match category and score >= ScoreLower and score <=ScoreUpper. You could also use a non-equi join in a query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    heynay01 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    9
    Thanks for pointing me in the right direction. Worked like a charm!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Update Multiple Fields based on Selection (inTable)
    By aguestnga in forum Database Design
    Replies: 3
    Last Post: 11-03-2011, 04:17 PM
  2. Form Based Query for Multiple Fields
    By sureelsaraf in forum Access
    Replies: 0
    Last Post: 03-28-2011, 06:14 PM
  3. Replies: 1
    Last Post: 01-10-2011, 12:25 AM
  4. Help with if statement to compare multiple fields
    By usmcgrunt in forum Programming
    Replies: 2
    Last Post: 12-01-2010, 06:43 PM
  5. update table in loop based on IF statement
    By LALouw in forum Access
    Replies: 0
    Last Post: 07-26-2009, 08:46 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