Hi Rob,
Stupid question time... Is there a form that you created to use the code you have provided?
Can you provide an example at all?
I have the exact same problem as the OP and this code should solve the problem for me... I hope.
Thanks!!