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!

Minimize one form, maximize another

Status
Not open for further replies.

sjdk

Programmer
May 2, 2003
59
0
0
US
I have a database where I open frmFirst at startup, then do a username lookup, then open frmBegin. This all works just fine. My problem is I want frmFirst to stay open, but either be minimized or invisible, and I want frmBegin to open maximized. If I put docmd.maximize on frmBegin's open event, both forms open maximized. What is an easy way to have one open and hide, and the other open and be right there?
Thanks in advance!
 
Thanks for the response...I put that code in the open event on frmFirst and frmFirst was visible.....did I put it in the wrong place?
 
Ok, great! I moved it to frmBegin and same result....frmBegin is visible and frmFirst is open on top of it. Hmmmm....... This seems like it should be so simple...I must be missing something obvious!

Thanks for your help thus far!
 
Are you sure that you are running the on open of frm begin
put a breakpoint by it and see if stops
 
This is the code from frmFirst

Private Sub Form_Open(Cancel As Integer)

UserName = fOSUserName
Usr = UserName

DoCmd.OpenForm "frmBegin", acNormal

End Sub
-----------
This is the code for frmBegin

Private Sub Form_Open(Cancel As Integer)
Forms("frmFirst").Visible = False

Me.Combo9.SetFocus

End Sub

I did put a break in and it did stop there, but it didn't disappear!
Did I do it right? Thank you so much for your help so far.
 
i can't see why that doesn't work

maybe take it out frmBegin code and add it into the open

Code:
Private Sub Form_Open(Cancel As Integer)
 UserName = fOSUserName
 Usr = UserName
 me.visible = false
 DoCmd.OpenForm "frmBegin", acNormal
End Sub

but as i say... the first way should work anyway so you may have no joy with this either

daveJam

even my shrink says its all your f#@/ing fault
 
Thank you all so much for your help. What I ended up doing is changing the flow of things so the first form could close and the next one could open. Again..thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top