Results 1 to 4 of 4
  1. #1
    BBQ is offline Novice
    Windows Vista Access 2003
    Join Date
    Sep 2011
    Posts
    2

    Change visibility of controls based on checkbox

    I am working on a form, and have a bunch of controls that I want to change their visibility based on a check box. If the check box is true, then I want to show the controls, if it is false, I want them to be hidden.



    I can get this to work, but my problem is when adding new records. If my checkbox value is true, and my controls are visible. When I click a command button to add a new record, the new records checkbox is also true. The controls are displayed. By default I want it to be false, and the controls to be hidden.

    If I then manually change this checkbox to false, and go back to my previous record (where it was true) then it is now false.

    What is going on?

    Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try putting some code in the Current Event of the Form.

  3. #3
    BBQ is offline Novice
    Windows Vista Access 2003
    Join Date
    Sep 2011
    Posts
    2
    Thanks, I managed to figure it out before reading your reply. I set the default value of the checkbox to false, and then put the code in the current event.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Great! It is always better when you figure it out by yourself.

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

Similar Threads

  1. Change controls on an empty form
    By Dom in forum Forms
    Replies: 2
    Last Post: 01-19-2011, 08:36 AM
  2. Replies: 3
    Last Post: 01-13-2011, 03:53 AM
  3. Visibility based on Combo selection
    By jlclark4 in forum Forms
    Replies: 1
    Last Post: 12-22-2010, 11:42 AM
  4. Visibility of other controls
    By jlclark4 in forum Forms
    Replies: 7
    Last Post: 12-15-2010, 12:34 PM
  5. Replies: 7
    Last Post: 11-26-2010, 07:54 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