count resulting record from SQL expression?

pungentSapling

NeedHotSauce?
Local time
Today, 14:33
Joined
Apr 4, 2002
Messages
115
Is there a way to count the resulting records from a sql expression without explicitly creating a recordset object.

I am using sql statements to filter form results and I need a way to determine if the sql statement that has been built is returning ZERO results....so I do not display a blank form.


Thanks
pungentSapling
 
Try this...
Code:
    If Me.RecordsetClone.RecordCount = 0 Then
        MsgBox "There are zero records in the data source!", vbInformation, "No Records Found"
        DoCmd.Close acForm, Me.Name
    End If
HTH
 
Thanks.......That werks great!!

Don't know why I didn't think O' it meself...


Thanks Agin'
P
 

Users who are viewing this thread

Back
Top Bottom