Maximise

  • Thread starter Thread starter ZootRot
  • Start date Start date
Z

ZootRot

Access 2002 SP-2

When I open a database, how can I ensure that the form containing the list
of tables (which opens automatically) opens maximised?

I've tried resizing and then saving, and there doesn't seem to be any
property setting for maximising.
 
ZootRot said:
Access 2002 SP-2

When I open a database, how can I ensure that the form containing the list
of tables (which opens automatically) opens maximised?

I've tried resizing and then saving, and there doesn't seem to be any
property setting for maximising.

In the Form's Open Event...

DoCmd.Maximize
 
ZootRot said:
Access 2002 SP-2

When I open a database, how can I ensure that the form containing the list
of tables (which opens automatically) opens maximised?

I've tried resizing and then saving, and there doesn't seem to be any
property setting for maximising.

First, I have a few observations/comments I'd like to make:

1. Users should never see the tables. You have very little control over the
data quality if they do. Use a form, even if it's a datasheet, so that you
can code the events and control the quality of data.
2. I'm not sure your users will appreciate you controlling their window
size. I know that I wouldn't. As you program more and more, you'll see that
the apps users like the most are the ones that allow them to make their
environment comfortable. That means allowing them to choose their own
resolutions, color schemes, and window sizes. Just a thought. Now for what
you are asking:

If you are talking about the database window, you'll need to use an AutoExec
macro with an action of Maximize. Name the macro: AutoExec. Access always
looks for a macro by that name when starting. This will only maximize the
database window, not the application, that is a Windows function. For
controlling how Windows maximizes, you'll need to use an API. Put the
following code in a standard module then call MaxApp in the Autoexec macro:

Public Const SW_MAXIMIZE = 3

Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow
As Long) As Long
Declare Function IsZoomed Lib "user32" (ByVal hwnd As Long) As Long

Function MaxApp()
Dim hWndAcc As Long
hWndAcc = Application.hWndAccessApp
If IsZoomed(hWndAcc) = False Then
Call ShowWindow(hWndAcc, SW_MAXIMIZE)
End If
End Function

The AutoExec macro will have 2 Actions:

RunCode Argument: MaxApp()
Maximize

--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Arvin,

That's a cool alternative!

Where'd you hear about? <g,d,& r>

--

Sco

M.L. "Sco" Scofield, MCSD, MCP, MSS, Access MVP, A+
Useful Metric Conversion #15 of 19: 5 dialogues = 1 decalogue
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
M.L. Sco Scofield said:
Arvin,

That's a cool alternative!

Where'd you hear about? <g,d,& r>

Be careful about patting yourself on the back, it can lead to muscle
strains.
<g>
 
LOL!

--

Sco

M.L. "Sco" Scofield, MCSD, MCP, MSS, Access MVP, A+
Useful Metric Conversion #15 of 19: 5 dialogues = 1 decalogue
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
Which is spelled "ScoMan"

Infamous I think...

--

Sco

M.L. "Sco" Scofield, MCSD, MCP, MSS, Access MVP, A+
Useful Metric Conversion #15 of 19: 5 dialogues = 1 decalogue
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
Back
Top