I have the following code:
Private Sub cmdDatasheet_Click()
DoCmd.OpenQuery "qryCourse_Details"
End Sub
I would like to check to make sure that this above query has zero rows,
then show a message box that says "There are no results in your query".
I can not put the following code in the forms open event but that
doesn't help as the query result is in a datasheet, not a form.
If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "Your request returned no records."
Cancel = True
End If
Is there any way to check if the results from a DoCmd.OpenQuery has
zero rows or not?
Marcus
******