Microsoft KB Archive/208896

= ACC2000: Setting Visible Property to False Does Not Hide Form =

Article ID: 208896

Article Last Modified on 6/29/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q208896



Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you set a form's Visible property to False, the form is not hidden.



CAUSE
The Database window is hidden, and the form's OnDeactivate property setting specifies a macro containing the Restore action.



RESOLUTION
To hide the form, either remove the Restore action from the macro specified in the form's OnDeactivate property, or do not hide the Database window.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 Start Microsoft Access and create a new database.  Create the following three new macros:   Macro Name   Macro Actions    Action Arguments -  AutoExec     RunCommand       Command: WindowHide OpenForm        Form Name: Form1 Restore     Restore Max         Maximize  Create a new, blank form.  Add a command button to the form, and set the button's OnClick property to the following event procedure: Private Sub Command0_Click Me.Visible = False DoCmd.OpenForm "Form2" End Sub </li>  Set the following properties for the form: OnDeactivate: Restore OnActivate: Max </li> Save the form as Form1.</li> Create another new, blank form. Save the new form as Form2.</li> Close the database, and then open it. Note that Form1 is opened automatically.</li> Click the command button on the form. Note that Form2 is opened, but Form1 is not hidden.</li></ol>

<div class="references_section">