Hello,
I am working on my first Access report, after working with Access for a few months.
I created a dialog form to pass selection criteria to the report. Most of the time this works fine. However, sometimes, in the Open Report event, there are no arguments in OpenArgs. In the dialog form, they are definitely there; I step through the modules and see the values. But by the time it gets to Open Event, OpenArgs are null.
For the time being, I have to exit Access and get back in when this happens. It seems to happen after I make changes to either the report VBA module or dialog form VBA module (but not always), but I haven't pinpointed it.
Any suggestions? Anything obvious that I am not doing?
I'd say it works 95% of the time.
Also, how would I keep dialog box open and allow user to go back and forth from dialog box and report to make selection changes and view report again?
My code from the dialog form is:
Thanks!
Lori
I am working on my first Access report, after working with Access for a few months.
I created a dialog form to pass selection criteria to the report. Most of the time this works fine. However, sometimes, in the Open Report event, there are no arguments in OpenArgs. In the dialog form, they are definitely there; I step through the modules and see the values. But by the time it gets to Open Event, OpenArgs are null.
For the time being, I have to exit Access and get back in when this happens. It seems to happen after I make changes to either the report VBA module or dialog form VBA module (but not always), but I haven't pinpointed it.
Any suggestions? Anything obvious that I am not doing?
I'd say it works 95% of the time.
Also, how would I keep dialog box open and allow user to go back and forth from dialog box and report to make selection changes and view report again?
My code from the dialog form is:
Code:
Me.Visible = False
DoCmd.OpenReport strReport, View:=acViewPreview, _
OpenArgs:=strReportArguments
Thanks!
Lori