Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    723
    Thanks
    34
    Thanked 2 Times in 2 Posts

    Hiding field on report

    In an Access 2010 report, I have a field that I don't want to appear on the report in Access but I do want to include when exporting to Excel. Setting the field height to 0 does the job but also makes the field invisible in design view (and hard to find unless you remember where you put it!). Is there a way to make a field invisible in report view but visible in design view and when exporting to Excel?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,619
    Thanks
    0
    Thanked 33 Times in 33 Posts
    Try setting the height to zero in the reports OnLoad event

  3. The Following User Says Thank You to patt For This Useful Post:

    Murgatroyd (2017-12-08)

  4. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    723
    Thanks
    34
    Thanked 2 Times in 2 Posts
    Thanks for your reply. What code do I need to put in the report's OnLoad event to set the height of a field?

  5. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,619
    Thanks
    0
    Thanked 33 Times in 33 Posts
    As far as I remember try the following:

    VariableName.Top = 0

  6. #5
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    723
    Thanks
    34
    Thanked 2 Times in 2 Posts
    Thanks. I found that putting "[FieldName].Height = 0" in the report's OnLoad event did the trick.
    Last edited by Murgatroyd; 2017-12-08 at 17:37.

Posting Permissions

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