I did think it was all the code that was relevant. It’s the select case statement that is generating the error.
The recordset SQL statement creates a huge recordset with looks like…
Surf_id, skid_esc_rv
2001, -0.01
2001, -0.01
2001, -0.14
2001, 0
2001, -0.12
2002, 0
2002, -0.01
Nothing...