Hi there,
Having problem with this parameter query which works off of a form and don't know how to resolve. Error being:-
"Run-Time error 2342...A RunSQL action requires an argument consisting of an SQL statement."
Thanks in advance.
Paul.
Having problem with this parameter query which works off of a form and don't know how to resolve. Error being:-
"Run-Time error 2342...A RunSQL action requires an argument consisting of an SQL statement."
Code:
Dim mysql
mysql = "SELECT tbl_pallet_log.ID, tbl_pallet_log.Entry_Date, tbl_pallet_log.order_Number, tbl_pallet_log.Customer_No, tbl_pallet_log.Customer, tbl_pallet_log.Postcode, tbl_pallet_log.Pallets " & _
"FROM tbl_pallet_log " & _
"GROUP BY tbl_pallet_log.ID, tbl_pallet_log.Entry_Date, tbl_pallet_log.order_Number, tbl_pallet_log.Customer_No, tbl_pallet_log.Customer, tbl_pallet_log.Postcode, tbl_pallet_log.Pallets " & _
"HAVING (((tbl_pallet_log.Entry_Date) Between [Forms]![frm_customer_pallet_report]![txt_date_from] And [Forms]![frm_customer_pallet_report]![txt_date_to]));"
DoCmd.RunSQL mysql
Thanks in advance.
Paul.