thanks for that.
I've changes the sub from private to public, but now I get this error:
The expression you entered as a query parameter produce this error:
'[txtbox_pream]'
txtbox_pream is a text box on the form whose value I pass as a parameter. But again, if I run the code from a button, I...