Results 1 to 3 of 3
  1. #1
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24

    Options to show only if main box checked "yes"

    Hello,
    I'd like secondary options to show only if main box is checked yes.
    For example, a list of dessert options (pie, cake, etc) show only if "dessert wanted?" box is checked "yes".


    Thank you!

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    You'll need to use your own actual Control names, of course:

    Code:
    Private Sub DessertWanted_AfterUpdate()
     If Me.DessertWanted = -1 Then
      Pie.Visible = True
      Cake.Visible = True
     Else
       Pie.Visible = False
      Cake.Visible = False
     End If
    End Sub
    
    Private Sub Form_Current()
     If Me.DessertWanted = -1 Then
      Pie.Visible = True
      Cake.Visible = True
     Else
       Pie.Visible = False
      Cake.Visible = False
     End If
    End Sub


    And this has to be a Single View Form, as you cannot make Controls Visible/Invisible on a Record-by-Record basis on Datasheet and Continuous View Forms.

    Linq ;0)>

  3. #3
    mkfloque is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    24
    Quote Originally Posted by Missinglinq View Post
    You'll need to use your own actual Control names, of course:

    Code:
    Private Sub DessertWanted_AfterUpdate()
     If Me.DessertWanted = -1 Then
      Pie.Visible = True
      Cake.Visible = True
     Else
       Pie.Visible = False
      Cake.Visible = False
     End If
    End Sub
    
    Private Sub Form_Current()
     If Me.DessertWanted = -1 Then
      Pie.Visible = True
      Cake.Visible = True
     Else
       Pie.Visible = False
      Cake.Visible = False
     End If
    End Sub


    And this has to be a Single View Form, as you cannot make Controls Visible/Invisible on a Record-by-Record basis on Datasheet and Continuous View Forms.

    Linq ;0)>
    Thank you! I'm very new to code and will try this. I'm going to make a combo box for the dessert choices Thanks again...

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

Similar Threads

  1. Replies: 2
    Last Post: 06-26-2012, 12:53 AM
  2. Replies: 11
    Last Post: 03-29-2012, 02:32 PM
  3. Replies: 3
    Last Post: 07-23-2011, 09:12 AM
  4. Replies: 1
    Last Post: 04-06-2011, 04:33 AM
  5. Fields do not show in "Form View"
    By hawzmolly in forum Forms
    Replies: 4
    Last Post: 01-09-2010, 06:27 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