filter problem

  • Thread starter Thread starter troy
  • Start date Start date
T

troy

if record isn't found the whole form goes blank. Is there a way I can keep
this from happening, say with a msgbox "file not found" ???

Thanks!

Troy
 
On the form OnOpen event you can write the code to check if the form has data

Private Sub Form_Open(Cancel As Integer)
' Check if there is data
If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "NoData"
' close the form
Cancel = True
End If
End Sub
 
Back
Top