Results 1 to 2 of 2
  1. #1
    lolo is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    4

    Question if function

    hello

    i want to write if condition in query that use to

    if the grades of the student A or B+ or B or C+ or C or D+ or D
    then the completed hours = sum of the course hours


    OR in other mean if grade Not = "F" then
    completed hours = sum of the course hours

    anyone that can help me to write the expression using if function????



    Best regards,

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    Try this out. please replace the FieldName and Tablename with the ones in your database.

    IIf([Grade]<>"F",DSum("[FieldName]","TableName"))

    I don't know the criteria of the Sum of Hours that you want to do. So I have used a DSUm without criteria.

    if this solves you problem mark the thread solved.

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

Similar Threads

  1. Help with AVG function
    By techexpressinc in forum Reports
    Replies: 1
    Last Post: 03-23-2010, 07:47 AM
  2. Function Help
    By th3spankst3r in forum Programming
    Replies: 12
    Last Post: 03-22-2010, 12:41 PM
  3. Want function to get current function name
    By Davis DeBard in forum Programming
    Replies: 2
    Last Post: 08-13-2009, 05:02 AM
  4. function key
    By marianne in forum Access
    Replies: 5
    Last Post: 05-14-2009, 01:26 AM
  5. Avg Function
    By hiker8117 in forum Access
    Replies: 3
    Last Post: 04-23-2009, 11:14 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