I tried this in both the Activate and Open events, but it doesn't seem to
recognize it. I don't understand why, because I have numerous other forms
with this and it works perfectly in every one. I'll post my code here in
case you see anything wrong with it. Otherwise, is there another property
that would override this command? It seems as though the issue has something
to do with the command button, because the MoveSize is successful when
opening the form on its own.
Private Sub Form_Open(Cancel As Integer)
DoCmd.MoveSize 5880, 200, 6660, 8616
End Sub
Also, here is the code for the command button. Do you see anything wrong
with that? I used the wizard, except for the addition of the datasheet line.
Private Sub cmdOpenInactive_Click()
On Error GoTo Err_cmdOpenInactive_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmUpdateInactive"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.OpenForm "frmUpdateInactive", acFormDS
Exit_cmdOpenInactive_Click:
Exit Sub
Err_cmdOpenInactive_Click:
MsgBox Err.Description
Resume Exit_cmdOpenInactive_Click
End Sub
Thanks once again!
Slze
Since the MoveSize method applies to the current form, you need to move it to
the form you are opening. Which event you put it in depends on when you want
it to execute. I would suggest the form Activate event. That way, if you
change to another form or open a report, it will be resized when the form
again becomes the active form.
That works as intended. Thanks!
[quoted text clipped - 17 lines]
DoCmd.OpenForm "FormName", acFormDS