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

Help with Access Report "No Data found"

Status
Not open for further replies.

psoriano

Technical User
May 10, 2004
4
US
I have a report that is generated over a time span the user chooses. If no data is in the report I want it to put a text message "NO DATA for this time period". I have experimented with the On No Data event but can't get the results I want. I want to be able to put the search Criterias that I Started to search on the report. Example; if I search for John Doe, with DOB 12/12/1985
I want it to say "No Data found" for John Doe, DOB 12/12/1985.

I need the user to be able to print the results out of the query Report no matter if records are found or not.

Thanks to you all for your support without your help I would have never crossed some of my hurdles

Psoriano
 
Are your criteria coming from controls on a form? If not, then you must change them. This would allow you to place controls in your report header referencing the values. If you are using a parameter query, you will not be able to do what you want.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Yes, I am using a parameter query and the report is perfect, but the user want to be able to get a report with the search criteria that she has entered and it should say not data found for.......

Do I need to do the whole report again. What do I need to do to be able to get this done for the user.

Thanks for your prompt answer.
Psoriano
 
I am not sure if you are suggesting to create a report of a form, but I believe you can't create a report from a form. I don't see the option. I may be wrong, I have not been playing with access for too long.

Thanks
 
Only the criteria for the query come from controls on a form. For instance if you have a form "frmDates" with two text boxes "txtStart" and "txtEnd" then your query criteria would be:
Between Forms!frmDates!txtStart And Forms!frmDates!txtEnd

Your control in the report header could have a control source like:
=IIf([HasData],"","No data from between " & Forms!frmDates!txtStart & " and " & Forms!frmDates!txtEnd


Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top