Thanks for the responses.

oh1mie, that's the code I am trying to use when I get the error.