Results 1 to 3 of 3
  1. #1
    ghillie30 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    6

    Report Fields Visible Based on Checkbox


    Hi - Another newbie here. I have an Access 07 report, and when viewing the report I'd like to have some checkboxes visible based on their value. In other words, I need the checkbox to be visible if it's checked and not visible if it's not. I have the following in the OnLoad event of the report;

    Me.Checkbox.Visible = Me.Checkbox.Value

    This works fine in print preview but makes no difference in normal view, the checkboxes are visible regardless of value. I'd like to keep normal view if possible. Thanks in advance for any help.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    in the OnFormat of the section of the report put:

    If me.checkbox = 0 or isnull(me.checkbox) then
    me.checkbox.visible=false
    end if

    If me.checkbox = -1 then
    me.checkbox.visible=true
    end if

    hope it helps,

  3. #3
    ghillie30 is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    6
    Hi - Thanks for the quick response, but no joy. Still same problem. I've read some other posts that say it can't be done in report view, if not I'll live with print preview.

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

Similar Threads

  1. make fields visible onclick() button
    By rivereridanus in forum Programming
    Replies: 4
    Last Post: 06-25-2012, 11:08 PM
  2. Replies: 2
    Last Post: 01-06-2011, 04:38 AM
  3. Replies: 1
    Last Post: 12-21-2010, 09:27 AM
  4. Report showing non-visible fields
    By AKQTS in forum Forms
    Replies: 2
    Last Post: 09-21-2010, 09:40 AM
  5. Setting fields visible/invisible
    By col5473 in forum Forms
    Replies: 1
    Last Post: 09-17-2010, 09:14 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