UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> DoCmd.Maximize doesn't work (sometimes)    
 
   
bill1one
post Jun 30 2005, 07:54 AM
Post #1

New Member
Posts: 7



I have a menu form that opens different reports. Here is the code for those reports.

Sub OpenRpt_Open()
DoCmd.Close acForm, "frmMenu", acSaveNo
DoCmd.Maximize
End Function

Sub CloseRpt_Close()
DoCmd.Restore
DoCmd.OpenForm "frmMenu", acNormal
End Function

What is wierd is that they work fine if the Database Window is displayed, but if I do not display the Database Window at startup, then the reports won't maximize like they should.

Any suggestions?
Go to the top of the page
 
+
MicroE
post Jun 30 2005, 08:32 AM
Post #2

UtterAccess VIP
Posts: 4,034
From: NY - USA



There is no reason to close and reopen the frmMenu. Move the code to the OnOpen and OnClose events of the Report.

CODE
Private Sub Report_Close()
    DoCmd.Restore
End Sub

Private Sub Report_Open(Cancel As Integer)
    DoCmd.Maximize
End Sub
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 22nd May 2013 - 09:25 PM