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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null report

Status
Not open for further replies.

GShen

MIS
Sep 26, 2002
561
US
Hi,
Not sure if I am posting in the correct Forum. I posted in SQL forum before this. I have a report in an ACCESS ADP database which is driven by a stored precedure. There are a number of parameters which get fed to the SP.
Everything works fine. However, if the user enters something incorrectly, the SP does not pass back any information and the user usually runs the report again because there is no way to tell if the user entered the data correctly. I am checking the @@Rowcount at the end of the SP and if set to zero, I do another SELECT and pass the parameters back to the report. The problem is you cannot do 2 selects and pass back data.
Does anyone know how I can get around this? Is there another way to notify the user what he/she entered on the report?
Thanks,
Hope I didn't get too wordy. Please respond back if I confused anyone.

Remember when... everything worked and there was a reason for it?
 
Can't you pass parameters from controls on forms? Seems that this would be much more robust.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookom,
Can't do that in the scheme of things. There are litteraly hundreds of reports. When a report needs a parm. it prompts the user. It is pretty simple. Otherwise, I would need a place to enter parms on every report, in every database. It is not feasible.
Is your knowledge in ACCESS, SQL or both?

Remember when... everything worked and there was a reason for it?
 
Most of my experience is Access and SQL. I have worked in the past with ADPs but it was a while ago.

In regular MDBs, I attempt to avoid all criteria in the report's record source. This include parameter prompts and references to controls on forms. My preferred method is to specify a where clause in the DoCmd.OpenReport method. This is so much cleaner in that I can dynamically create complex where clauses based on all kinds of user input.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top