G
Guest
Hi:
I want my report sorted by Product code, or Product name, or product weight
....
So I build an combo box, after user selects the sorting field, the reprot
will shows that.
How to write a code for that? (I don't want to use: View menu -> Sorting &
Grouping, it is not flexiable).
I have tried:
=================================================
qryTheSupplierID = "SupplierCode = '" & Me.cmbSupplierCode & "' ORDER BY
ProductCode ; "
DoCmd.OpenReport "rptProductSummerySheet", acPreview, , qryTheSupplierID
DoCmd.Close acForm, "frmTypeSupplierCodeForProductSummary"
====================================================
Error message: Syntax wrong.
Any suggestion, thanks.
James
I want my report sorted by Product code, or Product name, or product weight
....
So I build an combo box, after user selects the sorting field, the reprot
will shows that.
How to write a code for that? (I don't want to use: View menu -> Sorting &
Grouping, it is not flexiable).
I have tried:
=================================================
qryTheSupplierID = "SupplierCode = '" & Me.cmbSupplierCode & "' ORDER BY
ProductCode ; "
DoCmd.OpenReport "rptProductSummerySheet", acPreview, , qryTheSupplierID
DoCmd.Close acForm, "frmTypeSupplierCodeForProductSummary"
====================================================
Error message: Syntax wrong.
Any suggestion, thanks.
James