Results 1 to 5 of 5
  1. #1
    helpaccess is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    18

    Testing Scores

    I am a new user of Access and am having difficulty figuring out what type of function I would need to get the data I need. We have a database of scores, which are not numbers, for students on tests taken on different dates. We need to know:
    1. Number of students with a higher score than their last score
    2. Number of students with a lower score than their last score


    3. Number of students with the same score as last score
    4. Number of students with a score this month but no previous
    5. Number of students with no score this month

    The issue of scores not being numbers makes it difficult to compare what is higher since a regular > operator will not work. Any help would be much appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Even if the scores are in a text field, it is still possible to treat them as numbers.

    But if you still have problems, convert value to a number. Use Val or Clng.
    Example: Val([field1]) > Val([field2])
    Use in a query or textbox of form or report
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    helpaccess is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    18
    Thank you! Another problem is the test scores are not separated into 2 fields because tests are given at all different times. So there is a date field and then a test field. The ID for the database ties in to the student's name in another database. One student will have several ID's for the several tests she has taken. In this case, how do I tell Access to compare an previous score to the most recent?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The only requirement in your list that will be easy is no.5

    Comparing data between records is complicated. One way is with VBA and recordsets. Without VBA might be doable with a series of queries and/or domain aggregate functions (DMax, DLookup). I have never tried to build something like this.

    As an example, here is no.4. This assumes current month is February (2) and returns all students meeting the criteria, then use this query as basis for a Totals summary.
    SELECT Student, Month([TestDate])=2 AS CurrMonTest, DLookUp("Month(TestDate)","Table1","Month(TestDate )<>2 And Student='" & [Student] & "'")<>2 AS PrevMonTest
    FROM Table1
    WHERE (((Month([TestDate])=2)=True) AND ((DLookUp("Month(TestDate)","Table1","Month(TestDa te)<>2 And Student='" & [Student] & "'")<>2) Is Null));

    The other 3 could be even more difficult.

    Might be able to PIVOT the data with a CROSSTAB query.
    TRANSFORM First([Score]) AS FirstOfScore
    SELECT [Student]
    FROM Table1
    GROUP BY [Student]
    PIVOT Format([TestDate],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug"," Sep","Oct","Nov","Dec");

    All is further complicated if data is multi-year.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    helpaccess is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    18
    Thank you so much!

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

Similar Threads

  1. Testing Recordset for Records
    By AccessGeek in forum Programming
    Replies: 5
    Last Post: 03-22-2011, 12:26 PM
  2. Testing Task - Forms
    By collwill in forum Access
    Replies: 1
    Last Post: 03-09-2011, 10:25 PM
  3. Replies: 3
    Last Post: 02-04-2011, 07:32 AM
  4. Recording Test Scores and Radar Charts
    By splitz in forum Access
    Replies: 1
    Last Post: 08-19-2010, 12:34 PM
  5. Testing links
    By piflechien73 in forum Forms
    Replies: 0
    Last Post: 06-01-2009, 05:09 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