You can use the following code to count the records.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim numrecs As Integer
Set db = CurrentDb
Set rs = db.OpenRecordset("Select * From ... Where field = ...", dbReadonly)
rs.MoveLast
numrecs = rs.RecordCount
If the data in the field that you are searching for is a string, you have to enclose it in single quotes. dz
dzaccess@yahoo.com