Results 1 to 4 of 4
  1. #1
    abromley is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2018
    Posts
    3

    Show image if field in 1 or more records in selection is true

    My report shows test results for a laboratory, grouped into sample number so that each group may include results for several tests. If none of these tests are accredited then the accreditation logo shouldn't be shown. If all tests are accredited then the logo should be shown. This works as I've added linked the logo to the field indicating 'accredited' or 'not accredited' through the query.



    However, if at least one of the tests is accredited then I need the logo to be shown, and this bit isn't working. I've run a few examples through and it seems to work where there is a logo first and last, even if records in between do not include the logo, but if the record with no logo is first or last then the logo isn't shown, even though it's there on other records in the group. I really hope this makes sense!! Can anyone suggest a way to make sure the logo appears if at least one record includes it? I've tried everything I can think of but hit dead end.

    Thanks
    Angie

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    How many fields do you test for true?
    are they all yes/no fields?

    you could make a query ,Q1, to sum the test fields
    then join this query with the data table.

    Then in the OnCurrent event:

    Logo.visible= [SumOfTestFields] <0

  3. #3
    abromley is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2018
    Posts
    3
    Thanks - I'll try that. There's only one field but not set as yes/no at the moment as couldn't get that to work. Currently field shows 'accredited' or 'not accredited' as text, linked to a logo that only appears if 'accredited'. I'll change it to yes/no and see how that goes. The event you detail looks sensible. Thanks

  4. #4
    abromley is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2018
    Posts
    3
    Got it working. Not exactly as you suggested as couldn't get the oncurrent bit to work, but used the yes/no field and summed the results. Matched this to the logo table and hey presto it works! Thank you for your help.

    Angie

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

Similar Threads

  1. Replies: 8
    Last Post: 02-02-2018, 07:20 PM
  2. Show image only when field has a value
    By themushroomking in forum Programming
    Replies: 11
    Last Post: 07-18-2016, 05:54 AM
  3. Replies: 4
    Last Post: 03-06-2015, 03:50 PM
  4. Show/ hide image based on some field value
    By capitala in forum Reports
    Replies: 4
    Last Post: 04-06-2013, 10:56 AM
  5. Replies: 12
    Last Post: 02-10-2013, 10:13 AM

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