Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2010
    Posts
    1

    Unanswered: Button Vidibility not working :(

    I have made a form that has a 2 buttons 2 sub forms, one of the subforms and buttons visibility is set to no. What i want is when the visible button is clicked it should hide the visible subform subforms and the visible button then show the other subform and the other button that had the visibilty set to no. So far it hides the visible subform and shows the other subform that was set to no and the same with the button but it will not hide the button that was clicked. if that makes any sense at all?? this is the code
    btnAdd1_Click()
    btnAdd.Visible = True - this is the button that visibilty set to no
    frmothersubform.Visible = True - this is the subform that visibility set to no
    Mainsubform.Visible = False - this is the subform that is visible
    btnAdd1.Visible = False - this is the button that is initially visible when form is open
    Any help would be appreciated

  2. #2
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    You have to set the focus elsewhere before you can hide that button.
    like:

    btn1_click
    btn2.visible = true
    btn2.setfocus
    btn1.visible = false

    Sam, hth
    Good, fast, cheap...Pick 2.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •