Results 1 to 2 of 2
  1. #1
    jminshew01 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019

    Using a subreport record to control the visibility of a report text box???

    First, I am an Access Novice and have never learned to code, but I limp along with help from Google.

    Background: I handle product compliance for my company, and I am working to design a database that will generate a packaging advisement report for each product based the anticipated countries of sale, the product specifications, and the actual packaging requirements. I have all the "must haves" of this report functioning reliably at this point. The last "nice to have" is for warning translations (we could need up to 6 languages on a package, but often only 3) hidden when they aren't relevant and display an error message when they are relevant but the source data is null. I have a subreport in my report header that returns the languages relevant to the product based on a query that brings together the countries of sale for the product and the languages assigned to each of those countries. The subreport also does have a hidden field for appearance order that sorts the languages into the desired order, and this is a short number text box. I already have all the language fields in my detail section set to grow/shrink and they do hide when they are null. I also have swapped out their original labels for unbound text boxes formatted to look like labels.

    Problem 1: How do I make the unbound text boxes relate to the subreport values? For instance, if the subreport is displaying 3 records for English, French, and Spanish, then I want the text boxes serving as the labels for the English, French, and Spanish translations to be visible, but the German, Italian, and Dutch text boxes should all be hidden.

    Problem 2: How do I make the unbound text boxes display an error message such as "No Translation Available" if the subreport shows the language is needed, but the associated language field is null? Alternatively, I would be ok (maybe even happier) if the actual language field displayed this message while the label continued to show the language name.

    Problem 3: How do I made the language field hidden when it is not relevant, even if there is data in the text box?

    I feel like this is likely all one if/then statement, but I'm not sure how to write it or where to place it. I'm not afraid of digging in, I'm just a bit lost and my Googling hasn't helped do this specific thing.

    Thanks for the help!!!!

  2. #2
    jminshew01 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    I suppose I should add that I am on Access Online?? That wasn't an option when I signed up. I use Access through our Office 365 account, but I use the desktop application, not the web app.

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

Similar Threads

  1. Replies: 2
    Last Post: 03-14-2017, 02:48 AM
  2. Control visibility on continuous form
    By GraeagleBill in forum Forms
    Replies: 4
    Last Post: 12-26-2014, 05:33 PM
  3. Tag visibility using for loop on control
    By Ruegen in forum Programming
    Replies: 3
    Last Post: 11-13-2014, 04:08 PM
  4. Replies: 13
    Last Post: 05-14-2012, 03:41 AM
  5. Replies: 2
    Last Post: 11-09-2011, 06:16 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 - Senior Forums