Ok in my app I use cudtom user input to retrieve and display data via a report but if there is nothing to retrive the report comes up blank. I want to prevent this from happaning. This is what I tried.

DataReport_Activate()
If DataEvirorment.rsCommand.RecordCount <= 0 then
msgbox "No Data Error...", ,"Invalid Report"
Unload Me
End IF
End Sub

That would work except sometimes the code runs before the Commad is open so it errs out. This isn't really an important issue but it would make my application more profesional. Oh! Also for some reason if you closed te custom data form after the no data all the instances of my report would close saying the error msg I generate. Any Ideas why....

Thanks