Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close Report from Report_Detail 1

Status
Not open for further replies.

jimb0ne

Programmer
Oct 6, 2003
291
0
0
CA
I have a report in which I populate many fields from the Detail_Format section of the report using code. The report is based on a parameter query which allows the user to enter a specific sample number when the report is opened. If there is no associated sample for the number which the user enters I need to close the report. The only way I can see how to do this is to check for an error when I reference a textbox which is supposed to contain the proper sample number. The problem is I can't figure out how to cancel the report open from the detail format. I know I can cancel from the Report_Open event, but at that point the textbox has not yet been populated and I can not check to see if records were returned for the sample number the user entered. Any ideas?

thanks in advance,
James
 
Have a look at the NoData event procedure of the Report object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top