Sort Report by variable value

NicoleM99

Registered User.
Local time
Today, 08:48
Joined
Mar 7, 2012
Messages
13
Dear All,

I have built a form that contains comboboxes allowing the user to choose what they would like to see on their report. Below is an piece of code that takes the choice of the combobox, and puts it in the report. What I need help with is how to set lblfield1/tbfield1 as the value to use for sorting the finished report. Can anyone help me out with this please?


SetReportControls Forms!CustomReport.Combo10.Value, _
Reports!rptCustom.lblField1, Reports!rptCustom.tbfield1
SetReportControls Forms!CustomReport.Combo13.Value, _
Reports!rptCustom.lblField2, Reports!rptCustom.tbfield2
SetReportControls Forms!CustomReport.Combo12.Value, _
Reports!rptCustom.lblField3, Reports!rptCustom.tbfield3
SetReportControls Forms!CustomReport.Combo15.Value, _
Reports!rptCustom.lblField4, Reports!rptCustom.tbfield4
etc, etc...

Thank you :)
 
Thanks Gizmo...I hadn't thought of that :).

I need to keep it simple though...as it is set up now, the user can print the report they design with the form. As I am dealing with a bunch of sales agents across Italy, who have even less knowledge of Access than I do :), I would prefer not to allow them too much room to manuever. My colleagues who need more detailed reports, exported into Excel, etc. know how to open the db with shift and can make their own report without using my form.

I just wanted to set formatting so that the left column is always sorted A-Z. Is there a simple way to do this?
 

Users who are viewing this thread

Back
Top Bottom