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

J

JaRa

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
 
J

Joe

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
 
Top