I have built a web reporting system in ASP. I pick out SQL strings from a table and try to run them from the page. Sometimes the SQL man types incorrect SQL into the tables and when trying to run a report it errors. What I need to do is trap any errors that occur when i try to open the recordset from the SQL and display a nice error message. How do I do this I have tried doing if Err.Number > 0 then blah blah but it get to the line of code that generates the error ie (objRec.open Sql, objCon) and stops.