Hello diannk,
When using the SQL Select statement, the Table name is not used as a prefix. Only the column names are used. The From clause specifies the Table name.
When moving or looping through the record set, if the current record is the EOF then calling MoveNext will cause an error. You should always check that the recordset isn't empty before executing any move statement or loop to prevent generating an error. The recordset is empty if both BOF and EOF are True or if the recordset property RecordCount = 0. When referencing the Fields collection, you need to use the Item property to return a single object from the collection.
Make these changes throughout your code, and it should run.
Sincerely,
Leith Ross
Bookmarks