G
Guest
Custom Dialog Box for Report Criteria
I’ve got a problem with a custom dialog box in Microsoft Access 2002 and am
hoping someone can help me with this.
The situation is:
I am using a report based on a query (with the criteria set in the query
design), a custom dialog box that utilizes both Access VBA and macros. The
primary macro is a macro group that controls the custom dialog box and
criteria entry, etc. The secondary macro (when triggered by the VBA Event
Procedure) prompts the user to enter the criteria if the dialog form OK
button is clicked without any data in the criteria window.
All of the various components appear to work exactly as they should when run
independently. The problem arises when they are used in conjunction with
each other.
When using a form control to open the report, the custom dialog box is
opened and everything functions as it should except for the Cancel button on
the form, which is tied to a Close Form macro in the macro group. (This
button works perfectly on the dialog box when that form is opened by itself.)
In the “normal use†sequence, when the Cancel button is clicked, I get the
following Access error message:
“The expression you entered has a function name that Microsoft Access can’t
find.â€
When I click OK, the error message closes, but I am then presented with the
default Access criteria dialog box (“Enter Parameter Valueâ€) for the report.
If I enter the necessary criteria and click OK, the report will run
normally. If I click Cancel on this box, the criteria box closes and I get
the standard Access message “The OpenReport action was canceled.â€
Anybody know what’s going on here and how I can fix it?
I’ve got a problem with a custom dialog box in Microsoft Access 2002 and am
hoping someone can help me with this.
The situation is:
I am using a report based on a query (with the criteria set in the query
design), a custom dialog box that utilizes both Access VBA and macros. The
primary macro is a macro group that controls the custom dialog box and
criteria entry, etc. The secondary macro (when triggered by the VBA Event
Procedure) prompts the user to enter the criteria if the dialog form OK
button is clicked without any data in the criteria window.
All of the various components appear to work exactly as they should when run
independently. The problem arises when they are used in conjunction with
each other.
When using a form control to open the report, the custom dialog box is
opened and everything functions as it should except for the Cancel button on
the form, which is tied to a Close Form macro in the macro group. (This
button works perfectly on the dialog box when that form is opened by itself.)
In the “normal use†sequence, when the Cancel button is clicked, I get the
following Access error message:
“The expression you entered has a function name that Microsoft Access can’t
find.â€
When I click OK, the error message closes, but I am then presented with the
default Access criteria dialog box (“Enter Parameter Valueâ€) for the report.
If I enter the necessary criteria and click OK, the report will run
normally. If I click Cancel on this box, the criteria box closes and I get
the standard Access message “The OpenReport action was canceled.â€
Anybody know what’s going on here and how I can fix it?