Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jul 2004
    Location
    Ohio
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Close subform from within subform (2k)

    I have a subform that is pretty large on the screen and covers the button that opens it, so I put a button inside the subform to close it. But whenever i try to say subform1.visible = false, i get a error message saying you can't hide something that has focus. are you able to close a subform from within itself? i tried some different me.parent.subform.visible = false combos but that didn't help any. do you have to close the form from a control outside of it?
    <img src=/w3timages/blueline.gif width=33% height=2>
    <big>John</big>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Close subform from within subform (2k)

    Set focus to something outside the subform before hiding it.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2004
    Location
    Ohio
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Close subform from within subform (2k)

    Thanks Hans, got that one down.

    Another related interface question: When I click to open the form, im using code to automatically set the subform.left to a specific position, but i noticed that the subform's label is moving to the right hand side of the subform now, any idea why that would be happeneing?
    <img src=/w3timages/blueline.gif width=33% height=2>
    <big>John</big>

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Close subform from within subform (2k)

    No idea why, but I would add a line to set the Left property of the label too.

Posting Permissions

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