You can Update the code from a recordset to use this code instead.
Create a recordset with the SQL:
"SELECT * FROM table WHERE id = idparam"
and create a parameter idparam that is set to the record you want repeated (probably from a form post).
Then manually update the SQL after the recordset has been created to look like the code example you have above.