ACC1x: Hidden Subform Maximized If Main Form Is MaximizedID: Q99935
|
In a main/subform combination where the main form is maximized and the subform is hidden, the subform returns maximized when it is made visible. This results in covering the entire main form.
Because the Visible property is usually changed through a macro or function, work around this problem by adding steps to the process to restore the main form before the subform is made visible. Then, maximize the main form. An example of this workaround is detailed after the "Steps to Reproduce Problem" section below.
This problem no longer occurs in Microsoft Access version 2.0.
You can reproduce this problem by using the Orders form in the NWIND.MDB sample database. The following steps detail the macros necessary to reproduce this problem. The resolution to this sample problem is listed after the steps.
Macro Name Action
---------------------------
Hidden Setvalue
Visible Setvalue
Hidden Macro Actions
--------------------
Setvalue
Item: Forms![orders]![orders subform].Form.Visible
Expression: 0
Visible Macro Actions
---------------------
Setvalue
Item: Forms![orders]![orders subform].Form.Visible
Expression: -1
Command Button: Button1
Caption: Hide
OnPush: Show.Hidden
Command Button: Button2
Caption: Show
OnPush: Show.Visible
Visible Macro Actions
---------------------
Echo
Echo On: No
Restore
Setvalue
Item: Forms![orders]![orders subform].Form.Visible
Expression: -1
Maximize
Echo
Echo On: Yes
Microsoft Access "User's Guide," Chapter 22, "Using Macros with Forms"
Keywords : kbusage FmsSubf
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: March 23, 1999