2.0 7.0 97
WINDOWS
kbusage
The information in this article applies to:
- Microsoft Access versions 2.0, 7.0, 97
SYMPTOMS
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.
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 this to be a problem in Microsoft Access 2.0, 7.0,
and 97. We are researching this problem and will post new information here
in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Problem
- Start Microsoft Access and create a new database.
- Create the following three new macros:
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
- Create a new, blank form.
- Add a command button to the form and set the button's OnClick property
to the following event procedure:
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
- Set the following properties for the form:
OnDeactivate: Restore
OnActivate: Max
- Save the form as Form1.
- Create another new, blank form. Save the new form as Form2.
- Close the database and then open it. Note that Form1 is opened
automatically.
- Click the command button on the form. Note that Form2 is opened,
but Form1 is not hidden.
REFERENCES
For more information about macros, search the Help Index for "macros,"
and then "creating," or ask the Microsoft Access 97 Office Assistant.