The original recordset was just above the <html> tag. It should automatically remove it and update old references when you update a recordset and change it to a mysqli connection. I'm not sure why it didn't work in this case, but it must have been some sort of glitch.