Results 1 to 3 of 3
  1. #1
    tdelios is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    8

    How To Revert 'Visible' Property After Each Record Displayed In Report?

    Click image for larger version. 

Name:	screenshot.png 
Views:	7 
Size:	13.6 KB 
ID:	22066

    Hi All..

    I have 18 Labels and 1 Text box on my report. All of which the 'Visible' Property has been set to 'No'.

    The text box will always contain a numerical number ranging between 1 to 99. Each Label represents either a single digit value (ie. 1) or 2 labels for a double digit number (ie 15).

    On the 'On Format' event, I have code written to make the corresponding label(s) visible pending on the value in the numerical text box.. example code:

    If Me.Event_Number = 1 Or Me.Event_Number = 11 Or Me.Event_Number = 21 Or Me.Event_Number = 31 Or Me.Event_Number = 41 Or Me.Event_Number = 51 Or Me.Event_Number = 61 Or Me.Event_Number = 71 Or Me.Event_Number = 81 Or Me.Event_Number = 91 Then Me.Event1.Visible = True
    End If

    I assumed that after each record in my table that is associated to the report was displayed with the proper 1-2 labels, that the 'Visible' property for all 18 labels would reset back to 'No'. But they don't.. They remain visible in which their visible labels affect the next record displayed in the report causing an ongoing effect. See screen shot.



    so my question is this. What do I need to do so that only the specific labels related to the text box are only lit for each record that is displayed in the report?

    thanks
    tom

  2. #2
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    else
    Me.Event1.Visible = false

  3. #3
    tdelios is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    8
    thanks.. totally forgot about the 'else' !!! that did the job..

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

Similar Threads

  1. Replies: 10
    Last Post: 03-11-2015, 03:25 AM
  2. Replies: 1
    Last Post: 12-28-2013, 12:38 PM
  3. Replies: 5
    Last Post: 01-28-2013, 11:52 AM
  4. Setting visible property of subreport?
    By GaryElwood in forum Reports
    Replies: 1
    Last Post: 09-23-2011, 07:49 PM
  5. Visible property in subform columns
    By MDB in forum Forms
    Replies: 3
    Last Post: 09-03-2011, 06:46 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