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

no records, msgbox , + error?? 1

Status
Not open for further replies.

Samulayo

Programmer
Aug 13, 2002
46
GB
i have a nodata sub (as below), which gives a message if there are no messages, this is fine, but then an error message appears saying that you have cancelled the loading of the form etc. then an [OK]button. how can i stop the report from loading when there are no records without making this message appear? any help whould be greatfully accepted.


Private Sub Report_NoData(Cancel As Integer)
MsgBox "There are no records for this filter; Press OK to return to the Filter screen", vbInformation, "No Records"
Cancel = True
End Sub


Regards

Samulayo
 
Thank you very much, does exactly what i need, have a star
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top