ACC2000: AutoCenter and AutoResize Properties Ignored (208988)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q208988
Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SYMPTOMS

If you start Microsoft Access in minimized state, and you 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 size and location of the form may be incorrect.

RESOLUTION

To resolve this problem, use one of the following methods:
  • Set the AutoCenter and AutoResize properties of the form to No, and then manually size and position the form.

    -or-
  • Use a MoveSize action in the AutoExec macro to position the form correctly.

MORE INFORMATION

Steps to Reproduce the Behavior

CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

  1. In Microsoft Windows 95, Microsoft Windows 98, and Microsoft Windows NT, click Start, point to Find, and then click Files or Folders.

    In Microsoft Windows 2000, click Start, point to Search, and then click For Files or Folders.
  2. Type msaccess.exe in the first text box, and then click Find Now (or Search Now in Windows 2000).
  3. From the list of search results, drag the Msaccess.exe file to the desktop to create a shortcut to Msaccess.exe.
  4. Right-click the Msaccess.exe shortcut, and then click Properties on the menu that appears. Click the Shortcut tab.
  5. Click the text in the Target box, and then press END to move to the end of the text. Type a space, and then type the full path to the Northwind database after "Msaccess.exe" as in the following example:

    "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"

    NOTE: If your path name includes folder names that have spaces (for example, "Program Files"), you must enclose the full path to the program and to the database separately in quotation marks, as is done in the example.

  6. Click Minimized in the Run box, and then click OK.
  7. Double-click the new shortcut. Note that Microsoft Access opens minimized. Restore Access by clicking the Access button on the taskbar.
  8. On the Tools menu, click Startup, and then click the Categories form in the Display Form/Page box. Click OK.
  9. Quit Microsoft Access.
  10. Double-click the shortcut to Msaccess.exe again, and then click the Access button to restore the Access window. Note that the Categories form is not in the correct location (it is not centered in the window).

REFERENCES

For more information about the <AutoCenter> or <AutoResize> properties, click Microsoft Access Help on the Help menu, type autocenter in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Modification Type:MinorLast Reviewed:7/15/2004
Keywords:kbprb kbusage KB208988