Results 1 to 5 of 5
  1. #1
    ccchan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Location
    Philippines
    Posts
    11

    SQL, expression, code or anything help

    I have a query that displays the following:
    Click image for larger version. 

Name:	pic.png 
Views:	4 
Size:	27.0 KB 
ID:	15825


    I want to generate a report that will display the list of names and year level of the students who has a "PASS" remark. If the student has a "FAIL" remark in any subject, his/her name will not be included in the report.

    How can I do this?

    Thank you!

  2. #2
    trevor40's Avatar
    trevor40 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    407
    fastest way would be to make a report using the access report wizard, then go into the report properties and edit the record source.

    Edit the query the report is based on to - Example Only! not tested, your fields may be different.
    SELECT [student_list].*
    FROM [student_list]
    WHERE ((([student_list].[expr2])="pass"));
    or
    SELECT [student_list].*
    FROM [student_list]
    WHERE ((([student_list].[expr2])<>"fail"));

  3. #3
    ccchan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Location
    Philippines
    Posts
    11
    Hi there. I tried the sql statement you posted but it returned the names of the student with a FAIL remark.

  4. #4
    ccchan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Location
    Philippines
    Posts
    11
    I tried this statement but this returned the names with the "FAIL" remark.

  5. #5
    ccchan is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Location
    Philippines
    Posts
    11
    Quote Originally Posted by trevor40 View Post
    fastest way would be to make a report using the access report wizard, then go into the report properties and edit the record source.

    Edit the query the report is based on to - Example Only! not tested, your fields may be different.
    SELECT [student_list].*
    FROM [student_list]
    WHERE ((([student_list].[expr2])="pass"));
    or
    SELECT [student_list].*
    FROM [student_list]
    WHERE ((([student_list].[expr2])<>"fail"));
    Also, when i open the query it says that there is a circular reference.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-20-2012, 03:21 AM
  2. Replies: 4
    Last Post: 10-26-2012, 12:49 AM
  3. runtime error code 2427 expression with no value
    By snoopy in forum Programming
    Replies: 8
    Last Post: 06-10-2012, 11:07 PM
  4. Query Join, Expression, or Code
    By catguy in forum Queries
    Replies: 1
    Last Post: 08-17-2011, 10:52 PM
  5. Looking for a VBA code/expression
    By Bear in forum Access
    Replies: 5
    Last Post: 08-04-2011, 02:36 PM

Tags for this Thread

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