Hi
I have a form, frmreports, with an unbound combo box, cmb_sort, containing total_score and category.
If the user chooses total_score and clicks open report it launches a report, rptstrats, with a sub-report called tblstratssubreport.
I want to apply sorting within the sub-report tblstratssubreport, dependent on what they chose from the unbound combo-box
I have the following code, but the order by doesn't work.
any ideas?
thanks
Dim stDocName As String
stDocName = "rptstrats"
DoCmd.OpenReport stDocName, acPreview
Reports![rptstrats]![tblstratssubreport].Report.OrderBy = Forms!frmreports![cmb_sort]
I have a form, frmreports, with an unbound combo box, cmb_sort, containing total_score and category.
If the user chooses total_score and clicks open report it launches a report, rptstrats, with a sub-report called tblstratssubreport.
I want to apply sorting within the sub-report tblstratssubreport, dependent on what they chose from the unbound combo-box
I have the following code, but the order by doesn't work.
any ideas?
thanks
Dim stDocName As String
stDocName = "rptstrats"
DoCmd.OpenReport stDocName, acPreview
Reports![rptstrats]![tblstratssubreport].Report.OrderBy = Forms!frmreports![cmb_sort]