If a query has no results, can I hide or close it.

  • Thread starter Thread starter Guest
  • Start date Start date
Yep this will do it :

Private Sub Form_Open(Cancel As Integer)
If Me.Recordset.EOF Then
DoCmd.Close acForm, Me.Name
End If
End Sub

- Raoul
 
Thank you so much Raoul. It worked perfectly!

JaRa said:
Yep this will do it :

Private Sub Form_Open(Cancel As Integer)
If Me.Recordset.EOF Then
DoCmd.Close acForm, Me.Name
End If
End Sub

- Raoul
 
Back
Top