have tried

----

strSQLOut = "select * from DAILY_RET"
rsTableOut.Open strSQLOut, cnDataBaseOut, adOpenKeyset, adLockOptimistic

While rsTableOut.RecordCount > 0
rsTableOut.Delete adAffectCurrent
Wend

rsTableOut.Close

----

which works in another program i`m maintaining, but not in this one! the error is in the line doing the deleting... .RecordCount is not null... error is `Errors occured` - number is 80040e21

any ideas?