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!

Report problem

Status
Not open for further replies.

mama16

MIS
Oct 22, 2004
125
US
Hello,

I have a problem when I run a report. The parameter box pops up and ask information on some data. When the user enters the data, for example, "2001". Then, Access goes and grab all the data for the year 2001 but if the user enters another year that it's not in the system, it comes back with a report having an error in it .

How can I tell Access that if the year is not in the system or it's in the system but there is no data for that year ( it's blank), tell the user "Sorry but, there is no information for that year.

What state? CA Starting year? Ending Year?



Any ideas,

Thank you.
 
You can replace the error expression with something like:
=IIf(HasData, Sum([Qty]),0)
You can provide your own "else" part.

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]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Thank you guys, but I have the reports on a switchboard form. From there, the users can see them. Which button are you talking about, the one in the switchboard? Put the code in there.

Appreciated it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top