View Full Version : Filter by form (No records Msgbox?)


GeoffO
08-13-2001, 12:09 PM
HiI have a search form that opens with "filter by form", the problem is if no records
are returned the form goes blank, how do I get it to display a msgbox?. I've seen
some posts saying use "DCount"

If DCount ("*","QueryName")<= 0 then
MsgBox "No Records Match"
Exit Sub
End If


But since my form starts with Filter by Form, I have no name for the filter?.("QueryName")

Thanks

Geoff

Rich
08-13-2001, 01:52 PM
Use Form.RecordsetClone.RecordCount

GeoffO
08-14-2001, 01:20 PM
Hi

Use Form.RecordsetClone.RecordCount as the query name?

Thanks

Geoff