var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Open Report Using a Forms Filter - and Sort
I am using the code below to open a report based on the filter of a form
DoCmd.OpenReport "rptCustomers", acViewPreview, , Me.Filter
users may filter for a particular company, then sort by date
how can I also open the report to be sorted the same as the form is?
Thanks! - AB
Well....I suppose you could utilize the Report's OpenArgs parameter and the Report's OrderedBy property. Maybe try this:
DoCmd.OpenReport "rptCustomers", acViewPreview, , Me.Filter, ,"your OrderedBy String"
Then in the OnOpen event of your Report you could have something like this:
Hmmm....yup that should do it
If Len(Me.OpenArgs) > 0 Then
Me.OrderedBy = Me.OpenArgs
Me.OrderedByOn = True
Self Taught In ALL
Environments.....And It Shows!