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).
↑ Back to the top
When you set a form's Visible property to False, the form is not hidden.
↑ Back to the top
The Database window is hidden, and the form's OnDeactivate property setting specifies a macro containing the Restore action.
↑ Back to the top
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.
↑ Back to the top
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
↑ Back to the top
Steps to Reproduce Behavior
1. | Start Microsoft Access and create a new database.
|
2. | Create the following three new macros:
Macro Name Macro Actions Action Arguments
-----------------------------------------------------
AutoExec RunCommand Command: WindowHide
OpenForm Form Name: Form1
Restore Restore
Max Maximize
|
3. | Create a new, blank form.
|
4. | 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
|
5. | Set the following properties for the form:
OnDeactivate: Restore
OnActivate: Max
|
6. | Save the form as Form1.
|
7. | Create another new, blank form. Save the new form as Form2.
|
8. | Close the database, and then open it. Note that Form1 is opened
automatically.
|
9. | Click the command button on the form. Note that Form2 is opened, but Form1 is not hidden. |
↑ Back to the top
For more information about macros and how they work, click Microsoft Access Help on the
Help menu, type macros: what they are and how they work in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned.
↑ Back to the top