I don't know if you are still having trouble with this problem, but I figured out a way to fix most of the problem (albeit a bandaid).
I have set up a custom dialog to enter criteria for a report...I did it just like the Access help instructs...using a macro with open, close, ok and cancel actions - Open and close actions are attached to the same events on the report of interest, and the ok and cancel actions are attached to the associated command buttons on the dialog box. The criteria entered into the dialog box form are read by a parameter query using the syntax given in the Access help (i.e., [Forms]![CustomDialogForm]![CriteriaField]).
Now, to get around having to cancel the dialog form twice (once for the custom form, once for the access default parameter request form), I tweaked the original macro a bit and added another mcaro to the report itself.
Here's my amended version of the macro given in the Access help file. (Macro Name - Action (Arguments;;;
)
OpenDialog - OpenForm (DialogForm;Form;;;Edit;Dialog)
CloseDialog - Close (Form; DialogForm; No)
OKButton - SetValue ([Visible];No)
CancelButton - SetValue ([Visible];No)
(The Access help file said to set the CancelButton action to Close - Form (DialogForm;etc...))
Now, create a new macro to close the report. Set the following actions:
StopAllMacros
Minimize
Close (Report; YourReport; Yes (I don't know if setting Save to "yes" makes a difference or not.))
Then, in the report that this dialog box is opening, attach the Close Report Macro to the On No Data Event.
The only thing I haven't worked out, is that when I open the report from a switchboard, after the report closes, I get a msgbox saying "the previous action was cancelled"...I can live with that for now.
I know it's probably not very clean (from the design standpoint), or "professional," but as long as it works efficiently, that's my biggest concern. Hope this helps, if it's not clear, post a message, and I'll check back.
Fawn