Gary Samuels
asked on
Catch error on open report
DoCmd.openReport "ThisWeekPayReport", acViewReport, , , acDialog
The above command is fired by a button on a form. The data source of the report has a criteria of employee number. Once the button is clicked Access opens a dialog box titled "Enter Parameter Value". If an incorrect number is entered how can I catch it?
Is there some kind of an OnError condition that I could place the DoCmd inside of that would catch it if an incorrect number was entered?
The above command is fired by a button on a form. The data source of the report has a criteria of employee number. Once the button is clicked Access opens a dialog box titled "Enter Parameter Value". If an incorrect number is entered how can I catch it?
Is there some kind of an OnError condition that I could place the DoCmd inside of that would catch it if an incorrect number was entered?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If I wanted to use a textbox and verified the input.
Could I add the Filter and Where parameters to the DoCmd.openReport statement to accomplish the same thing?
Something like:
DoCmd.openReport "ThisWeekPayReport", acViewReport,Filter=[Emplo yeeNumber] ,WHERE=textbox.value , acDialog
Could I add the Filter and Where parameters to the DoCmd.openReport statement to accomplish the same thing?
Something like:
DoCmd.openReport "ThisWeekPayReport", acViewReport,Filter=[Emplo
ASKER
Thanks