I have a form that passes two numeric values (state_id and product_id) to a template for inserting those values into a mailing list table
However, whenever I submit the form I get the error below (the processing template code is also below): Being new to PreserveSingleQuotes and replace functions, I can't help but think its something in those two functions syntax wise that I've done wrong ERROR: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. SQL = "INSERT INTO mailing_list (product_id, state_id) SELECT p.product_id, s.state_id FROM products p, states s WHERE p.product_id IN ('1') AND s.state_id IN ('3')" PROCESSNG TEMPLATE CODE: <CFSET Product_id_QVL = "'" & replace(replace(product_id,"'","''","ALL"),",","','","ALL") & "'"> <CFSET state_id_QVL = "'" & replace(replace(state_id,"'","''","ALL"),",","','","ALL") & "'"> <CFQUERY Name="InsNewXref" DataSource="pap_search"> INSERT INTO mailing_list (product_id, state_id) SELECT p.product_id, s.state_id FROM products p, states s WHERE p.product_id IN (#PreserveSingleQuotes(product_id_QVL)#) AND s.state_id IN (#PreserveSingleQuotes(state_id_QVL)#) </CFQUERY> Tim ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188135 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54