B
Brian
I have quite a few continuous forms that, through right-clicking on various
fields, my users can customize to display the data exactly as they want.
This includes not only filtering records, but also sorting them.
I am able to easily duplicate the form into a report into which I can
correctly pass the forms Filter criteria. However, how can I pass the forms
OrderBy criteria to the report using VBA?
Right now, my code looks like...
docmd.openreport reportname, acviewpreview, , reportfilter, acwindownormal
on error resume next
docmd.selectobject acreport, reportname
docmd.runcommand accmdprint
docmd.close acreport, reportname, acsaveno
Obviously reportname and reportfilter are string variables.
Any help anyone can give would be most appreciated.
fields, my users can customize to display the data exactly as they want.
This includes not only filtering records, but also sorting them.
I am able to easily duplicate the form into a report into which I can
correctly pass the forms Filter criteria. However, how can I pass the forms
OrderBy criteria to the report using VBA?
Right now, my code looks like...
docmd.openreport reportname, acviewpreview, , reportfilter, acwindownormal
on error resume next
docmd.selectobject acreport, reportname
docmd.runcommand accmdprint
docmd.close acreport, reportname, acsaveno
Obviously reportname and reportfilter are string variables.
Any help anyone can give would be most appreciated.