ACC1x: Duplicate Control Menus and Restore Buttons on Form

ID: Q108440


The information in this article applies to:


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:


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.


MORE INFORMATION

Steps to Reproduce Problem


  1. Open the sample database NWIND.MDB.


  2. Create the following new macro. Save it as Test Menu:
    
          Action
          --------------------------------
          AddMenu
             MenuName: View
             MenuMacroName: Test Menu View 



  3. Create the following new macro. Save it as Test Menu View:
    
          Action
          ------------------
          OpenForm
             FormName: Test2 



  4. Create a blank, unbound form. Add a text box to the form, and then save the form as Test2.


  5. 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 



  6. Create a text box bound to the Company Name field at the top of the Test form's detail section.


  7. Size the Test form's detail section so that it is as short (vertically) as possible.


  8. View the Test form in Form view.


  9. Maximize the form.


  10. 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.


  11. From the View menu, choose Test2.


  12. From the File menu, choose Close.

    Note that the Test form now has two Control menus and two Restore buttons.



Keywords          : kbusage FmsProp 
Version           : 1.0 1.1
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: March 30, 1999