Results 1 to 2 of 2
  1. #1
    JonathanT is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    118

    Davg Multiple Criteria Syntax

    I have a calculated field on a report. I am trying to return the average of records filtered by 2 different criteria. I'm using the Davg function. One of the criteria is a text field and one is a number field. The formula works with one criteria but not with two. My results are either the average of the entire column or blank. Any help would be approciated



    =DAvg("occrms","arr-dep","[dayof]='mon'" And "[yearof]=2012")

    occrms is the field
    arr-dep is the table
    [dayof] is the 1st critera and a text field
    [yearof] is the 2nd criteria and a number field

  2. #2
    JonathanT is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    118
    I was able to figure out the correct syntax. I had extra quote marks that I didn't need. Her is the corrected syntax
    =DAvg("occrms","arr-dep","[dayof]='mon' And [yearof]=2012")

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

Similar Threads

  1. DAvg with multiple criteria help
    By mphynson44 in forum Access
    Replies: 4
    Last Post: 10-03-2013, 02:17 PM
  2. Replies: 7
    Last Post: 06-28-2013, 12:15 PM
  3. Problem with DAvg function
    By averagejoe in forum Access
    Replies: 1
    Last Post: 10-05-2012, 05:43 AM
  4. Simple Criteria syntax mismatch - please help!
    By whatwouldmattdo in forum Queries
    Replies: 4
    Last Post: 10-19-2011, 04:57 PM
  5. Syntax criteria for first timr
    By Casper2012 in forum Queries
    Replies: 6
    Last Post: 08-28-2011, 09:11 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