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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maxmize Main Form... and ONLY main form...

Status
Not open for further replies.

Woodman650

Technical User
Jan 20, 2005
92
0
0
US
Hey guys,
I'm having a problem maximizing a form... the form opens automatically when the DB does and maxmizes using this code:
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
End Sub

but when I open up any other forms from that form, they maxmize too. When I close them to get back to the main form, the main form is no longer maximized. any ideas? thanks!!
 
You can do it in GotFocus, OnActivate Events of the form. "DoCmd.Echo..." to stop flickering the screen.
Code:
DoCmd.Echo False
Docmd.Maximize
DoCmd.Echo True

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top