Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Letting User Select by Form how to Sort Report

Status
Not open for further replies.

ksgirl2

Programmer
Jul 19, 2002
45
US
Hello.
I was wondering if anyone knew how to Create a method of having a user select which variables they want their report sorted and grouped by. For instance....they could select by date, employee, shift. ...etc. and get totals based on their selections alone...whether it was by just date or date and shift or all three...etc.
I know how to make a Report group fields by all of these things but what if i want to turn these grouping functions on and off based on what the user selects?
Am I clear as mudd?

Thanks in Advance for any help!
Have a great day of programming!
 
Well, when a user clicks a heading or whatever you want to use by sorting, you could change the recorsource in the code. Adding an "ORDER BY" clause to the end, then refresh the form.
 
You can do it many ways.
A way I like to do (and my users like) is to duplicate a table style header on the form for ech column using labels. In the nclick you can have the record source requery for a different criteria. On the finished product is looks smooth and works well.
Just make sure that the field they want to sort by is indexed in the table or you could face a long update based on the number fo records.
If you need more detail, holler.

Rhonin
"too many questions, too little time..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top