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
thanks in advance,
James