Results 1 to 6 of 6
  1. #1
    ybg1 is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    23

    Invisible field in a report

    In a report on a certain condition i want the field to be invisible


    and the code is :
    If Me.Field1 = 1 then
    Me.Field2.Visible = False
    End if
    But the problem is that when I type Me.Field2.
    the word Visible doesn't appear on the list.

    I use Access 2003.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    You want the name of the textbox displaying Field2, not the name of the field. Then the visible property should be displayed. If that is the name of both, Access may be confused but you should be able to type in Visible and use it anyway.

    You can also use Conditional Formatting, by setting the font color appropriately.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ybg1 is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    23
    I've changed the name of it to another name so the text box has different name than the field and it is the same.
    I'm trying to do that on the Format_Detail part .

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Well, like I said if you're using the name of the textbox, you can just type Visible and it should work. Sometimes the intellisense goofs up. The detail format event is the correct event, but don't forget to add an Else clause that sets Visible = True.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    ybg1 is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    23
    Thanks a lot.

    I've tried without a condition and found that the visible=false worked.

    Than I made a condition that if the value is Null than visible=false ELSE visible=True.

    Great stuff

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Happy to help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Invisible/visible box
    By teirrah1995 in forum Forms
    Replies: 4
    Last Post: 10-03-2010, 02:45 AM
  2. Setting fields visible/invisible
    By col5473 in forum Forms
    Replies: 1
    Last Post: 09-17-2010, 09:14 AM
  3. Combo Boxes Visible/Invisible
    By Rick West in forum Forms
    Replies: 2
    Last Post: 07-06-2010, 09:41 AM
  4. Report keeps asking a for field value!
    By yobi4ever in forum Reports
    Replies: 2
    Last Post: 01-21-2010, 05:57 AM
  5. Invisible LookUp Data List
    By aaghd in forum Access
    Replies: 3
    Last Post: 07-28-2009, 02:35 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