No records in a report

Starstream

New member
Local time
Today, 23:23
Joined
Jun 2, 2006
Messages
2
Can anyone help please ?

I have a report linked to a query and would like to be able to print the report with a text box that will display 'No records for these dates' if a particular group header section contains no data. Start and end dates are picked up from a parameter prompt in the query and are displayed in the report header.

I'm afraid I am not very experienced in Access, so I would be grateful for any help in an idiot proof format!

Many thanks
 
Empty forms

Try the following, amended as necessary to fit your requirements.

Private Sub Form_Open(Cancel As Integer)
If Me.RecordsetClone.RecordCount = 0 Then
Cancel = True
MsgBox "Sorry, no records found with that name", , "Last name not found"
End If
End Sub
 
if there are no records at all you can use the On_NoData event for the report. But I think you are saying you have the report grouped by a field and if there is no data for this particular group then have a box saying no records. Is this correct?
 
Yes, the report is grouped and I would like the report to show a text box within the group (that will display both on screen and print in the appropriate section) if there are no records - if thats possible!
 
I'm thinking maybe you could do something with the IIF fuction in the group header. Can you post your db so I can have a look?
 
Has thgis been solved?

Starstream, did you get this to work?
If so, please post tyhe solution. I'd like to do this as well but am getting nowhere.

Thanks.
 

Users who are viewing this thread

Back
Top Bottom