Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hiding report controls (2003 (SP2))

    I know this is simple, it's just that I can't remember how!

    I have a text box on a report that I want to be visible only when a specific text box, on a criteria form, has data. e.g. if I've not got a customer name in the relavant form text, then the one on the report becomes visible=false.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hiding report controls (2003 (SP2))

    You can use code in the On Format event of the section that contains the control you want to hide. For example, if it is in the Detail section:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.[NameOfTextBox].Visible = Not IsNull(Forms![NameOfForm]![NameOfControl])
    End Sub

    Substitute the correct names

  3. #3
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hiding report controls (2003 (SP2))

    Cheers, that's the trick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •