Hi guys,
I have a problem with OnClick event procedure. I have a button and I want to execute query after clicking that button. Of course. And event I wanna execute is:
sSQL = "PARAMETERS [Forms]![frmOne]![cmbProvincia] Text ( 255 );" & _
"TRANSFORM Sum(product!price*sales!qty) AS Expr1" & _
"SELECT product.product_name " & _
"FROM customer INNER JOIN (product INNER JOIN " & _
"sales ON product.product_id = sales.product_id) ON customer.customer_id = sales.customer_id" & _
"WHERE (((customer.provincia) = [Forms]![frmOne]![cmbProvincia]))" & _
"PIVOT customer.city;"
DoCmd.RunSQL sSQL
and it doesnt work. Where could be a problem? Does runSql support just simple statements? because that statement was generated by access itself, when I created the crosstab query in query designer and switched into sql view and copy pasted it into sSQL variable.
Thanks lot
Pete
I have a problem with OnClick event procedure. I have a button and I want to execute query after clicking that button. Of course. And event I wanna execute is:
sSQL = "PARAMETERS [Forms]![frmOne]![cmbProvincia] Text ( 255 );" & _
"TRANSFORM Sum(product!price*sales!qty) AS Expr1" & _
"SELECT product.product_name " & _
"FROM customer INNER JOIN (product INNER JOIN " & _
"sales ON product.product_id = sales.product_id) ON customer.customer_id = sales.customer_id" & _
"WHERE (((customer.provincia) = [Forms]![frmOne]![cmbProvincia]))" & _
"PIVOT customer.city;"
DoCmd.RunSQL sSQL
and it doesnt work. Where could be a problem? Does runSql support just simple statements? because that statement was generated by access itself, when I created the crosstab query in query designer and switched into sql view and copy pasted it into sSQL variable.
Thanks lot
Pete