ACC: Setting Visible Property to False Does Not Hide FormID: Q121899
|
Novice: Requires knowledge of the user interface on single-user computers.
When you set a form's Visible property to False, the form is not hidden if
the Database window is also hidden and the form's OnDeactivate property
setting specifies a macro containing the Restore action.
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.
Microsoft has confirmed this to be a problem in Microsoft Access 2.0, 7.0, and 97.
For Microsoft Access 97:
Macro Name Macro Action
-------------------------
AutoExec RunCommand
OpenForm
Restore Restore
Max Maximize
AutoExec Actions
----------------------
RunCommand
Command: WindowHide
OpenForm
Form Name: Form1
Restore Actions
---------------
Restore
Max Actions
-----------
Maximize
For Microsoft Access version 2.0 and 7.0:
Macro Name Macro Action
-------------------------
AutoExec DoMenuItem
OpenForm
Restore Restore
Max Maximize
AutoExec Actions
----------------
DoMenuItem
Menu Bar: Database
Menu Name: Window
Command: Hide
OpenForm
Form Name: Form1
Restore Actions
---------------
Restore
Max Actions
-----------
Maximize
Sub Button0_Click ()
Me.Visible = False
DoCmd.Openform "Form2" 'Use this line in Microsoft Access 7.0
'and 97
DoCmd OpenForm "Form2" 'Use this line in Microsoft Access 2.0
End Sub
OnDeactivate: Restore
OnActivate: Max
For more information about macros, search the Help Index for "macros," and then "creating," or ask the Microsoft Access 97 Office Assistant.
Keywords : FmsProp
Version : 2.0 7.0 97
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 8, 1999