Sizing Access Window (Access 97)

Is there a way to size the Access application window in Access 97 in VBA? I want to be able to set it the application window to be the same size as the "main" form that I have open at the beginning (so it would run in the Form_Load event).

Re: Sizing Access Window (Access 97)

Usually the way you size the application window is to drag the handles for the main window, then close the database. The next time you open it, it should come up that same size. Otherwise, you have to resort to Windows API calls to resize the application window.

Re: Sizing Access Window (Access 97)

Here is a routine that opens your forms and centers them on the screen.
Place this in the declarations section of a module
Global g_ScreenWidth As Integer ' Screen width for CenterForm sub
Global g_ScreenHeight As Integer ' Screen height for CenterForm sub

Re: Sizing Access Window (Access 97)

Thanks Charlotte and ready4data for the replies. However, what I'm looking for and can't seem to find *anywhere* is how to control the main Access window with code. I manage about 12 databases, some requiring more screen real estate than others and I'd like to set the windows according to the needs of each one, if that's possible, instead of having to manually resize the window each time one opens up. I believe it has something to do with the hWndAccessApp property or the hWnd property, and then some declarations to some Windows API's (I'm on NT btw), but even Google came up with only resizing the forms. And my VBA skills are limited pretty much to Access...the fog tends to set in when API calls are required. But I'm willing to work through whatever is required.