Results 1 to 5 of 5
  1. #1
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117

    Making buttons visible and invisible

    Hi guys,

    I have a combo box with a drop down with two different options the user can choose, either "Draft", or "Final"

    I want when the user clicks on "Draft", two buttons will appear named "EMR_Form" and "FR_Form," I don't know what I want the final button to show yet but if you guys help me with when the user clicks Draft so the two buttons will become visible and when they click final the two buttons will disseapear.



    Thanks guys!

  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,518
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    Thanks, that worked. But what if the user clicks Draft, and the two buttons appear, but he made a mistake and meant to click Final. When he clicks on final, the two buttons that appear are still there, how do I get rid of those if the user chooses something else?

    Thanks!

  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,518
    What is your code exactly, and where is it? I'd expect the Else clause to set it back.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    This for the buttons to be invisible when the form starts

    Private Sub Form_Load()
    Me.EMR_Form.Visible = False
    Me.FR_Form.Visible = False
    Me.Command141.Visible = False
    Me.Combo146_Label.Visible = False
    Me.Combo146.Visible = False

    When the user clicks Draft on the combo box, another combo box appears or if they click Final, just one button appears

    Private Sub Combo137_AfterUpdate()
    If Me.Combo137 = "Draft" Then
    Me.Combo146_Label.Visible = True
    Me.Combo146.Visible = True
    End If
    If Me.Combo137 = "Final" Then
    Me.Command141.Visible = True
    End If

    This is the code when the user picks Draft and the other combo box comes up asking the user If they want to fill out an EMR and FR, then both buttons appear to fill out the form, or if just FR, then the FR button appears, otherwise if EMR, then only that button comes up.
    Private Sub Combo146_AfterUpdate()
    If Me.Combo146 = "Both EMR & FR" Then
    Me.EMR_Form.Visible = True
    Me.FR_Form.Visible = True
    End If
    If Me.Combo146 = "FR" Then
    Me.FR_Form.Visible = True
    End If
    If Me.Combo146 = "EMR" Then
    Me.EMR_Form.Visible = True
    End If

    Thanks!

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

Similar Threads

  1. Replies: 7
    Last Post: 12-12-2013, 07:11 PM
  2. Replies: 6
    Last Post: 05-07-2013, 02:43 AM
  3. Making a Command Buttong Visible/Invisible
    By Lupson2011 in forum Forms
    Replies: 3
    Last Post: 02-16-2012, 12:03 PM
  4. Making subform field visible/invisible
    By Snufflz in forum Forms
    Replies: 3
    Last Post: 01-17-2011, 05:30 AM
  5. Invisible/visible box
    By teirrah1995 in forum Forms
    Replies: 4
    Last Post: 10-03-2010, 02:45 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