You do have the recordset Open
and Close
methods in the right order, so there is no problem there.
The error "Either BOF or EOF is True, or the current record has been deleted" simply means that one of your SELECT
queries has returned zero records. What you do about that depends on your requirements. For example, you could test for Not rs.EOF
before attempting to read a field value.