ACC: AutoCenter and AutoResize Properties Ignored

ID: Q119474


The information in this article applies to:


SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

If you start Microsoft Access minimized and automatically load a database that contains an AutoExec macro that opens a form that has its AutoCenter or AutoResize property (or both properties) set to Yes, the form's size and location may be incorrect.


RESOLUTION

Set the form's AutoCenter and AutoResize properties to No and manually size and position the form.

-or-

Use a MoveSize action in your AutoExec macro to position the form correctly.


MORE INFORMATION

Steps to Reproduce Behavior

Using Windows 95 or later with Microsoft Access 7.0 and 97:

CAUTION: Following the steps in this example will modify the sample database NorthWind.mdb. You may want to back up the NorthWind.mdb file, or perform these steps on a copy of the NorthWind.mdb database.
  1. Click the Start button, point to Find, and then click Files or Folders.


  2. In the Named box, type msaccess.exe, and then click Find Now.


  3. Drag the Msaccess.exe file to your Desktop to create a new shortcut called "Shortcut to Msaccess.exe."


  4. Using the right mouse button, click the MSaccess.exe shortcut, and then click Properties on the menu that appears. Click the Shortcut tab.


  5. Type a space, and then the full path to the Northwind database in the Target box after Msaccess.exe as in the example below:
    
            C:\Access7\Msaccess.exe C:\Access7\Samples\Northwind.mdb 


  6. Click Minimized in the Run box, and then click OK.


  7. Double-click the new shortcut. Note that Microsoft Access opens minimized. Restore Microsoft Access from the task bar.


  8. Click Startup on the Tools menu, and select the Categories form in the Display Form box. Click OK.


  9. Quit Microsoft Access.


  10. Double-click the "Shortcut to Msaccess.exe" again, and then maximize the Microsoft Access toolbar icon. Note that the Categories form is not the correct size and is not in the correct location.


Using Windows 3.x or Windows for Workgroups with Microsoft Access 2.0:

CAUTION: Following the steps in this example will modify the sample database NWIND.MDB. You may want to back up the NWIND.MDB file, or perform these steps on a copy of the NWIND database.
  1. In Windows Program Manager, select the Microsoft Access Icon and then choose Properties from the File menu.


  2. In the Command Line box, add a space and then NWIND.MDB to the end of the line.


  3. Select the Run Minimized check box and then choose OK.


  4. Start Microsoft Access.


  5. Maximize the Microsoft Access icon, and then create and save the following new macro in the sample database NWIND.MDB:
    
          AutoExec Macro
          ------------------------
          Action: OpenForm
             Form Name: Categories 


  6. Open the Categories form in Design view.


  7. Set the Categories form's AutoCenter and AutoResize properties to Yes and then save the form.


  8. Quit Microsoft Access.


  9. Start Microsoft Access again and then maximize the Microsoft Access icon. Note that the Categories form is not the correct size, and is not in the correct location.



REFERENCES

For more information about the AutoCenter or AutoResize properties, search the Help Index for "AutoCenter" or "AutoResize," or ask the Microsoft Access 97 Office Assistant.

Additional query words: place locate


Keywords          : kbusage FmsProp 
Version           : 2.0 7.0 97
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: April 6, 1999