MS Access: How Can I pass the Sort Order of a subform to a report
Posted on 2015-02-09
How Can I pass the Sort Order of a subform to a report? Right now, i am able to open the report passing the filtered parameters from the form to the report, but i ll also like to sort. So it passes the filter but not the sort order. Is there a practical wasy to also pass the sort order from the form to the report? The user can chose to sort by any column. Here is the code:
Private Sub CmdPreviewReport_Click()
Dim stDocName As String
stDocName = "Report_Name"
DoCmd.OpenReport stDocName, acPreview, , Me.MainWorkloadQueryForm.Form.Filter