An error occurs when after MoveFirst if a db is empty. What should I do? Ask if RecordCount=0 before? Another way?
Thanks!
Please, forgive my English, it's horrible!
Printable View
An error occurs when after MoveFirst if a db is empty. What should I do? Ask if RecordCount=0 before? Another way?
Thanks!
Please, forgive my English, it's horrible!
I haven't found RecordCount to be a reliable property to use. Most often, I find newly initialized recordsets attached to empty tables to have a RecordCount of 4. However, the EOF property does seem to be dependable. So, in my code anywhere it might encounter a recordset like that, you will find something like this:
If Not RecordSet1.EOF Then
RecordSet1.MoveFirst
Else Goto SkipTheWholeDarnThing
Regards,
Dave Todd
------------------