Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / July 2005

Tip: Looking for answers? Try searching our database.

Sorting and Grouping Expression

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill Johnson - 29 Jul 2005 14:51 GMT
I was hoping to use an expression in the Sorting and Grouping form for a
Report.  I want the User to choose what field to sort the report on in a
form.   The expression I've used is:
=Forms!frmProofRptSortOrder!Combo16
Where Combo16 contains a list of field names to sort on.   It doesn't appear
to have any effect at all.   Any help?

Thanks!   Bill
Bill Johnson - 29 Jul 2005 18:11 GMT
Never mind, I got it.   I added the following to the OnOpen Event:

Select Case Forms!frmProofRptSortOrder!Combo16
       Case "LastName"
           Me.GroupLevel(0).ControlSource = "LastName"
           Me.GroupLevel(1).ControlSource = "FirstName"
           Me.GroupLevel(2).ControlSource = "Phone"
           GoTo NormalEnd
       Case "DeviceID"
           Me.GroupLevel(0).ControlSource = "DeviceID"
           Me.GroupLevel(1).ControlSource = "LastName"
           Me.GroupLevel(2).ControlSource = "FirstName"
           GoTo NormalEnd
       Case "CubicleID"
           Me.GroupLevel(0).ControlSource = "CubicleID"
           Me.GroupLevel(1).ControlSource = "LastName"
           Me.GroupLevel(2).ControlSource = "FirstName"
           GoTo NormalEnd
       Case "Phone"
           Me.GroupLevel(0).ControlSource = "Phone"
           Me.GroupLevel(1).ControlSource = "LastName"
           Me.GroupLevel(2).ControlSource = "FirstName"
           GoTo NormalEnd
       Case "Phone3000"
           Me.GroupLevel(0).ControlSource = "Phone3000"
           Me.GroupLevel(1).ControlSource = "LastName"
           Me.GroupLevel(2).ControlSource = "FirstName"
           GoTo NormalEnd
       Case Else
           Me.GroupLevel(0).ControlSource = "LastName"
           Me.GroupLevel(1).ControlSource = "FirstName"
           GoTo NormalEnd
   End Select

> I was hoping to use an expression in the Sorting and Grouping form for a
> Report.  I want the User to choose what field to sort the report on in a
[quoted text clipped - 4 lines]
>
> Thanks!   Bill
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.