Run only if records exist

SueBK

Registered User.
Local time
Tomorrow, 09:45
Joined
Apr 2, 2009
Messages
197
I have a form that opens filtered against various criteria.

I have code sitting in the "on load" to update information on the form. If there's no data against the filtered criteria I get a de-bug message. This will obviously (unnecessarily) freak out the client :-)

I assume there would be a relatively simple line of code I can add at the beginning to say "if no records don't run the rest of this code"?
 
Perhaps (untested):
Code:
If me.Recordset.RecordCount<> 0 Then
...do your stuff here
End If
 
Lovely. I knew it would be easy. Its just knowing what VB calls things.
 

Users who are viewing this thread

Back
Top Bottom