Popup Window

mithani

Registered User.
Local time
Today, 21:33
Joined
May 11, 2007
Messages
291
Hi friends,

I have got print button in my form. What I am doing is:

DoCmd.OpenForm "remarks", acNormal
DoCmd.OpenReport "Ac-report", acViewPreview,

When I click my print button, form "Remarks" popups and immediately my report runs.

How can I fix that when I close my "Remarks" form than only my report run?

Thanks

Mithani
 
Make the "remarks" form a Popup form and Modal. Both of these properties will be in the Other tab for the form properties. The Modal will make the code stop running until after "remarks" is closed, or hidden.
 
Thanks GolferyGuy,

I did popup and modal properties YES but still reports run immediately after open "Remarks" form. What could be the reason? any Clue.

Thanks

mithani
 
Thanks GolferyGuy,

I did popup and modal properties YES but still reports run immediately after open "Remarks" form. What could be the reason? any Clue.

Thanks

mithani
 
The acNormal in

DoCmd.OpenForm "remarks", acNormal

is overruling the Modal/Popup properties of the form itself

Use

DoCmd.OpenForm "remarks", acDialog

instead.

Linq
 
Thanks Missingling,

Sorry man I was sick so couldn't see your reply. I couldn't find acDialog option. Few options are there: acDesign, acFormDS, acLayout, acNormal & acPreview.

thanks

mithani
 
Thanks Missingling,

Sorry man I was sick so couldn't see your reply. I couldn't find acDialog option. Few options are there: acDesign, acFormDS, acLayout, acNormal & acPreview.

thanks

mithani

These "options" are for running Reports! I said you need to open your "remarks" form with

DoCmd.OpenForm "remarks", acDialog

which means the that the following line, executing the report printing, will be delayed until you close the "remarks" form.
 
Actually, it is the 6th parameter, not the 2nd parameter.
DoCmd.OpenForm "Remarks",,,,,acDialog
 
The acNormal in

DoCmd.OpenForm "remarks", acNormal

is overruling the Modal/Popup properties of the form itself

Use

DoCmd.OpenForm "remarks", acDialog

instead.

Linq

You can have BOTH acNormal AND acDialog in the open, if you wish, because as GolferGuy has mentioned the acDialog is the SIXTH parameter and the view acNormal is the second. So, you can use

DoCmd.OpenForm "remarks", acNormal,,,,acDialog

and it should work just fine because acNormal specifies the view type and acDialog specifies the MODE that it opens with.
 

Users who are viewing this thread

Back
Top Bottom