Thanks everyone. I did it.
When changing to Office 2007 or later, Access used a library other than 2003, so it had to be explicitly declared as using the DAO or ADODB library.
Do not use "Dim As Database", must use Dim db As DAO.Database -
Dim rs As DAO.Recordset