DoCmd.Minimize not working


G

Guest

I need to minimize Form 1 and then open Form 2. I think I have the syntax
right, and here's the code on my "submit" button on Form 1

=================================
Private Sub Enter_Survey_data_Click()
Dim stForm2 As String
stForm2 = "FRM - Step 2"

DoCmd.Minimize
DoCmd.OpenForm stForm2

End Sub
=================================

Form 1 is NOT minimizing, in fact it stays in front of Form 2 - any ideas?
I'd be fine with Form 2 "popping-up" over Form 1, but even with a SetFocus on
Form2 it's not working.....
 
Ad

Advertisements

T

TC

(1) Does docmd.minimize take parameters? (I don't have Access here to
check) If so, try:
docmd.minimize acform, me.name

(2) Why bother anyway? If you open another form, it will generally open
on top of the calling form. Isn't that enough?

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
G

Guest

For your 2 points:

1) Nope - doesn't take (or want/accept) any parameters
2) That's what I thought, but in this case Form 2 (the form that is called)
does NOT pop up over Form 1 (the calling form)

Thanks for the fast reply
 
T

TC

Maybe the calling form has Popup=True, and the called form doesn't? If
so, make the calling form a non-popup form, or conversely, make the
called form a popup form also.

HTH,
TC (MVP Access)
http://tc2.atspace.com
(off for the night)
 
Ad

Advertisements

G

Guest

Thanks again for your help. I finally was able to make it "minimize" by
moving the minimize command to a different place in the code. Now the
correct form is open, the correct form is minimized, but the focus isn't on
the right form.... No big deal, thanks for your help.
 

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

Top