Results 1 to 3 of 3
  1. #1
    JustAnElf is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2013
    Posts
    16

    How to test for Yes/No in a report?

    Greetings One and All,

    I have built a report that I really like. It shows what documents a user has filled out when they complete a different MS Access form. The text of the report version looks like this.

    Report1
    UserName Document1 Document2 Document3
    User 1 Yes No Yes
    User 2 Yes Yes Yes
    User 3 No No No

    I now want to add a 4th column to the report titled Completed. If the user has answered yes to all three fields (Document1, Document2, and Document3) then a value of Yes would be displayed under the Completed field. The report would look like this.

    Report1
    UserName Document1 Document2 Document3 Completed
    User 1 Yes No Yes No


    User 2 Yes Yes Yes Yes
    User 3 No No No No


    How do I get the MS Access report to sum the Yes’s going horizontally? If I were to guess I need to add a new temporary field to the report called Completed and then somehow do a True/False test with the Document1, Document2, and Document3 fields. Sadly, I’m having trouble figuring out what that test would be. Any suggestions? If it helps, all of the fields are in the Detail section of the report.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    put the logic for 'Complete' in the query that is the record source for the report.

    the technique to use is the IIF statement..... Bing about on IIF in queries and you'll see alot of examples...it is very useful

  3. #3
    JustAnElf is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2013
    Posts
    16
    Excellent. Thank you for the advice and leading me in the right path. I did what you suggested and figured out how to use the IIF statement. The report works beautifully with the new column.

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

Similar Threads

  1. Lab Test and Parameters ERD
    By cap.zadi in forum Database Design
    Replies: 3
    Last Post: 11-14-2012, 09:29 AM
  2. Test
    By goatamus in forum Access
    Replies: 1
    Last Post: 02-02-2012, 02:44 PM
  3. Test Score Results
    By bob.bud in forum Queries
    Replies: 5
    Last Post: 01-18-2012, 04:59 PM
  4. test box prompt
    By neil123williams in forum Reports
    Replies: 13
    Last Post: 01-10-2012, 05:48 PM
  5. Keying in Test answers to Access DB from Written Test
    By CityOfKalamazoo in forum Access
    Replies: 3
    Last Post: 03-01-2010, 08:58 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