Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2002
    Location
    Louisiana
    Posts
    3

    Unhappy Unanswered: How do I hide a subform after I open it?

    Hi, need help with a subform. I place a subform with in the form with is visible=false untill I click the command button the subform becomes visible=true. that works good.
    Now, my problem how can I go by closing (or hide it ) only the subform and not the whole form I try placing a
    DoCmd.Close acForm, Me.Name
    and also
    DoCmd.Close
    but it closes the whole subform and form.
    I just want it to hide or close the subform once I click on the CmdButton
    Thank you for any input.

  2. #2
    Join Date
    Jul 2002
    Posts
    67
    Try setting the visible property to the subform to FALSE.
    Don't do today, what can be done tomorrow.

  3. #3
    Join Date
    Oct 2002
    Location
    Louisiana
    Posts
    3
    Originally posted by SLACKER
    Try setting the visible property to the subform to FALSE.
    the subform is all ready set to visible=false

    Private Sub cmdOrder_Click()
    frmIssueItemssubform.Visible = True

    these is the code to open the subform with in the form.

    now I need to close(or hide) the subform only not the whole form
    by putting a button in the subform and not in the form

  4. #4
    Join Date
    Oct 2001
    Location
    Chicago
    Posts
    440
    You must first ditch the focus and then hide the control/subform.

    Forms!ParentForm!SomeControl.SetFocus
    Me.Visible = False
    'or
    'Forms!ParentForm!SubformControlName.Visible = False

    Matt

  5. #5
    Join Date
    Oct 2002
    Location
    Louisiana
    Posts
    3
    Thanks for the input I GOT IT set I had to take 2 day off Sat and Sun to clear my mind and look at this database with a clear mind. So, I try it and it work thanks for the info.

    Originally posted by Rockey
    You must first ditch the focus and then hide the control/subform.

    Forms!ParentForm!SomeControl.SetFocus
    Me.Visible = False
    'or
    'Forms!ParentForm!SubformControlName.Visible = False

    Matt

Posting Permissions

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