Results 1 to 6 of 6
  1. #1
    Rickochezz is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    45

    DAvg Syntax with Between function

    Hello All

    What I am trying to do here is find the Average Score that all students got on a Final Exam that scored X amount on a practice Exam.

    Exam 1: Format(DAvg("[MSGTPExam1]","MSGTP","[Exam1] =" & [Exam1]),"Percent")

    Field - MSGTPExam1
    Table - MSGTP

    Now if I want to open up my parameters a bit - for example if the student got a score of 64% on the Practice exam - Instead of averaging all that received 64% I would like to average all that received 62%-66% (All that scored within 2% of their score)

    Exam 1: Format(DAvg("[MSGTPExam1]","MSGTP","[Exam1] =" & Between [Exam1]-.02 And [Exam1]+.02),"Percent")

    This does not work? Any other ideas to accomplish my wish?

    Thanks


    Rick

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051

    DAvg Syntax with Between function

    Try using < and>


    Sent from my iPhone using Tapatalk

  3. #3
    Rickochezz is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    45
    I'm sure that would work as well Andy - The problem I seem to be having is getting the syntax right

  4. #4
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Code:
    Expr1: DAvg("[exam1]","ID","[exam1] between " & ([EXAM1]+5) & " and " & ([EXAM1]-5))

  5. #5
    Rickochezz is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    45
    Thanks Andy - That is what I was looking for - works like a charm

  6. #6
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    No prob


    Sent from my iPhone using Tapatalk

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

Similar Threads

  1. DAvg/Avg Function in Report
    By M_vyncci in forum Reports
    Replies: 4
    Last Post: 06-25-2016, 03:38 AM
  2. Using DAvg function
    By GraeagleBill in forum Programming
    Replies: 2
    Last Post: 04-03-2015, 11:03 AM
  3. Davg Multiple Criteria Syntax
    By JonathanT in forum Programming
    Replies: 1
    Last Post: 10-30-2013, 10:16 PM
  4. Problem with DAvg function
    By averagejoe in forum Access
    Replies: 1
    Last Post: 10-05-2012, 05:43 AM
  5. IIF function syntax
    By kris335 in forum Access
    Replies: 5
    Last Post: 09-13-2011, 11:14 AM

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