docmd.movezize Not Working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Not working on the button to open the form, not working on the On Open event
for the form itself. It maximizes instead.

It's gonna get tossed out the window (literally) unless someone can help.
Thanks!
 
Well for one thing it's MoveSize......

I'd create the following in a module:

Public Function fMoveSize()
DoCmd.MoveSize 1, 1, 14000, 9000
End Function

Then in the form's On Open event I'd put something like below:

Private Sub Form_Open(Cancel As Integer)
fMoveSize
End Sub

Now it could be maximizing because
(1) You have too many twips in the MoveSize arguments.
(2) Somewhere else in code you have a maximize statement.
(3) You have a maximize statement on another form or report but not a
DoCmd.Restore when that form loses focus or is closed.
 
I'm not sure what you are attempting, but DoCmd.Restore will restore the
form down from maximized.

Maybe if you posted your code and what you want to accomplish with it, we
can be of more help.
 
You could also create a macro with the movesize command, and attach that to
On Click; you may have better luck positioning your form on the screen that
way.
The macro builder lets you input "right", "down" [to position the top left
corner of your window] and "Width", "Height" to set the size of your window.
 
MoveSize won't work on a (currently) maximized Form!

You need to use Restore before Maximize like

Application.Echo False, "Processing ..."
DoCmd.Restore
DoCmd.MoveSize 0, 0, 5000, 5000
Application.Echo True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top