Microsoft KB Archive/108440

{|
 * width="100%"|

ACC1x: Duplicate Control Menus and Restore Buttons on Form

 * }

Q108440

-

The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1

-

SYMPTOMS
A maximized, continuous form has two Control (system) menus and two Restore buttons.

CAUSE
Duplicate Control menus and Restore buttons will appear on a form under the following conditions:


 * The form is a maximized, continuous form.
 * The form's detail section is short, so multiple records are displayed in Form view.
 * A record in the lower part of the Form window is selected.
 * The form has a custom menu that activates another form.
 * The other form is activated from the custom menu and then closed.

RESOLUTION
Add the following macro action to the beginning of the macro attached to the custom menu that opens the second form:

   Action -   DoMenuItem MenuMar: Form MenuName: Edit Command: Select Record Subcommand:

This macro action will select the current continuous form before opening the second form. For example, to open a second form called Test2, use the following macro actions:

   Action -   DoMenuItem MenuMar: Form MenuName: Edit Command: Select Record Subcommand: OpenForm FormName: Test2

STATUS
Microsoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.

Steps to Reproduce Problem
 Open the sample database NWIND.MDB.  Create the following new macro. Save it as Test Menu:

     Action AddMenu MenuName: View MenuMacroName: Test Menu View

  Create the following new macro. Save it as Test Menu View:

     Action --     OpenForm FormName: Test2

 Create a blank, unbound form. Add a text box to the form, and then save the form as Test2.  Create a new form bound to the Customers table. Add the following properties to the form, and then save the form as Test:

     OnMenu: Test Menu DefaultView: Continuous Forms

 Create a text box bound to the Company Name field at the top of the Test form's detail section.</li> Size the Test form's detail section so that it is as short (vertically) as possible.</li> View the Test form in Form view.</li> Maximize the form.</li> Click in the Company Name box in the record closest to the horizontal scroll bar (which is the lowest record visible on the form).

NOTE: If you select a record closer to the top of the window, the problem will not occur.</li> From the View menu, choose Test2.</li> From the File menu, choose Close.

Note that the Test form now has two Control menus and two Restore buttons.</li></ol>

Keywords : kbusage

Issue type : kbbug

Technology :