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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top