Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Posts
    126

    Question Hide form, then unhide it

    Hi all,

    I have a form that opens another form, in which the user uses to run an export, and then closes it.

    I would like the first form to go invisable, while it's open, and then go back to visable when the form closes.

    How do you reference another form?

    Thanks!

    Ken

  2. #2
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120

    try this

    Here is a sample of how to open one form while closing the other.
    Hopefully you can modify it to suit your needs.

    Michael

    Sorry 'bout that. I deleted the db - I'm not that familiar with form/subforms.

    Per the Help files:
    Refer to a form, report, subform, or subreport in an expression

    You refer to an open form or report, or the subform or subreport of an open form or report, in an expression by typing its identifier.
    To refer to an open form or report

    Type the name of the Forms or Reports collection, followed by the ! operator and the name of the form or report. For example, the following identifier refers to the Orders form:

    Forms![Orders]

    To refer to a subform or subreport
    Refer to the subform or subreport control on the form or report that contains the subform or subreport, then use the Form or Report property of the control to refer to the actual subform or subreport.

    Type the identifier for the form that contains the subform, followed by the name of its subform control, the . (dot) operator, and the Form property. For example, the following identifier refers to the Orders Subform subform on the Orders form:

    Forms![Orders]![Orders Subform].Form

    Notes

    You can use the Expression Builder to create an identifier for a form, report, subform, or subreport.
    When you run a macro or Visual Basic for Applications code containing an expression that refers to a form or report, the form or report must be open.

    For more information on creating an expression using the Expression Builder, click .
    For more information on using identifiers in expressions, click .
    For information on referring to the value of a control or property in an expression, click .
    Last edited by mrabrams; 03-03-03 at 15:27.

  3. #3
    Join Date
    Jan 2003
    Posts
    126
    It won't allow me to convert or enable database, due to security.

    I need my mail form to stay open, I just want it to .visable = false

    in the form load of the sub form I'm not sure how to refence the main form to make it false.

  4. #4
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    Originally posted by GA_KEN
    It won't allow me to convert or enable database, due to security.

    I need my mail form to stay open, I just want it to .visable = false

    in the form load of the sub form I'm not sure how to refence the main form to make it false.
    the method i uses is form_<formName>.visible = false

    Form_perCust.Visible = False

    for the form perCust
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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