Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resize to entire screen 2

Status
Not open for further replies.

regmellon

Programmer
Nov 25, 2002
6
0
0
US
hi all,
I was wondering if there was an easy way to resize an access form to the full size of the inside access window. I do not want to maximize as I have alot of other forms that open and I dont want them to be maximized. I just need the code to get the size of the access window.
Thanks,
Reg
 
Reg,

Do you know about opening forms in Pop Up mode? That makes it so they don't maximize, even if other forms are maximized. It's pretty handy.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developers' section of the site for some helpful fundamentals.
 
Jeremy,
Yes i did know about popups. Is that the best way around it? and Can you open reorts as popup? I would perfer code to resize the window but i guess popups might work.
Reg
 
With popup set to yes, form cannot be maximized.

Else you can resize a form in code:
MyForm.SetFocus 'to prevent that another form has the focus
DoCmd.Restore

 
I, too, am having trouble with resizing forms.

My switchboard form is set to a specific size and location, but when a user opens and maximizes a report - the switchboard is maximized when the user closes the report.

Can you tell me how to set the Switchboard back to its predefined size when the user closes the report?

I have tried the popup, but it keeps the focus on the form, rather that switching to the report.

Any help is always appreciated.
MW
 
Restore your report when closing:

Private Sub Report_Close()
DoCmd.Restore
End Sub


To move/resize the active window you can use the method:
DoCmd.MoveSize
[, down][, width][, height]
 
Let's put another twist on this:
I'm trying to open a .rpt file using a Crystal Control. This is working fine:

Private Sub btnCustomerCallRpt_Click()

CRCCLR.Action = 1

End Sub

But, when I try to add a MoveSize command:

Private Sub btnCustomerCallRpt_Click()

CRCCLR.Action = 1
DoCmd.MoveSize (720, 720, 8641, 10081)

Exit Sub

DoCmd.Restore
End Sub

I am getting Syntax errors.
What I'm trying to do is size/place the viewer window. The restore command is working fine.

Thanks!
 
I work with these properties:

Me.WindowHeight
Me.WindowWidth
Me.InsideHeight
Me.InsideWidth

I use them to dynamically move and size controls when the form is maximized. WindowHeight and WindowWidth sounds like what you want.
 
Bad syntax in "DoCmd.MoveSize (720, 720, 8641, 10081)"
When you don't use a method as function (you don't get value returned by function), you must not have parehesis:

DoCmd.MoveSize 720, 720, 8641, 10081
 
[Side note]
TorF is spot on about the syntax. That whole thing with when to have parens and when not to was a real pain for me, so I learned to do this
Call DoCmd.MoveSize (720, 720, 8641, 10081)

It's a little extra typing, but it makes it so that I don't have try it one way and then the other. I use call whenever I use a method as a function.

But clearly this is not a right/wrong thing, just a personal crutch I use.

Jeremy
[/Side Note] =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developers' section of the site for some helpful fundamentals.
 
REGMELLON: I have better solution if you do not want to use popup mode

try to embed this in your code

DoCmd.MoveSize (,,,)(also see MSACCESS help on this) Good luck,
Kuzz

"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top