If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
sorting by control value
Is there a way to sort a form's reports by the value found in a
specified field or control? Normally the form will sort according to record number, and that is just not going to work as the records were entered not in the order I would like to have them viewed. The Order By in the form's property window appears to do nothing when I enter the control's name in it. |
#2
|
|||
|
|||
sorting by control value
On Mon, 01 Jun 2009 22:09:33 -0500, Russ wrote:
Is there a way to sort a form's reports by the value found in a specified field or control? Normally the form will sort according to record number, and that is just not going to work as the records were entered not in the order I would like to have them viewed. The Order By in the form's property window appears to do nothing when I enter the control's name in it. When you manually add a control name to the OrderBy property NOTHING happens unless you also tell Access to apply the sort. You apply the sort when you right click on the form (in Form View) and select "Apply Filter/Sort". Conversely, to go back to the previous sort, you would right-click on the form and select "Remove Filter/Sort" Anything wrong with you simply selecting the control and clicking on the Sort A-Z or Z-A toolbutton? -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#3
|
|||
|
|||
sorting by control value
Russ,
You could try placing the below in the On_Open event of the form... Me.OrderBy = "YourFieldNameHere" Me.OrderByOn = True -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Russ" wrote in message ... Is there a way to sort a form's reports by the value found in a specified field or control? Normally the form will sort according to record number, and that is just not going to work as the records were entered not in the order I would like to have them viewed. The Order By in the form's property window appears to do nothing when I enter the control's name in it. |
#4
|
|||
|
|||
sorting by control value
On Mon, 1 Jun 2009 20:26:20 -0700, fredg
wrote: On Mon, 01 Jun 2009 22:09:33 -0500, Russ wrote: Is there a way to sort a form's reports by the value found in a specified field or control? Normally the form will sort according to record number, and that is just not going to work as the records were entered not in the order I would like to have them viewed. The Order By in the form's property window appears to do nothing when I enter the control's name in it. When you manually add a control name to the OrderBy property NOTHING happens unless you also tell Access to apply the sort. You apply the sort when you right click on the form (in Form View) and select "Apply Filter/Sort". Conversely, to go back to the previous sort, you would right-click on the form and select "Remove Filter/Sort" Anything wrong with you simply selecting the control and clicking on the Sort A-Z or Z-A toolbutton? Thanks. I was not aware of having the user tell Access to apply the sort. I wondered why that never worked for me. However, I really want the form to display the records sorted by that particular control when it's initially opened without the user applying the sort. Any way to do that? |
#5
|
|||
|
|||
sorting by control value
On Mon, 1 Jun 2009 23:37:07 -0400, "Gina Whipp"
wrote: Russ, You could try placing the below in the On_Open event of the form... Me.OrderBy = "YourFieldNameHere" Me.OrderByOn = True Thanks Gina I think that may work out fine. I tried the OrderBy code yesterday, but was unable to figure out the syntax with my limited knowledge of VBA. |
#6
|
|||
|
|||
sorting by control value
Russ,
Your knowledge is not limited... you knew where to come to get the answer, I call that VAST knowledge! Your Welcome, Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Russ" wrote in message ... On Mon, 1 Jun 2009 23:37:07 -0400, "Gina Whipp" wrote: Russ, You could try placing the below in the On_Open event of the form... Me.OrderBy = "YourFieldNameHere" Me.OrderByOn = True Thanks Gina I think that may work out fine. I tried the OrderBy code yesterday, but was unable to figure out the syntax with my limited knowledge of VBA. |
#7
|
|||
|
|||
sorting by control value
On Mon, 01 Jun 2009 22:09:33 -0500, Russ wrote:
Is there a way to sort a form's reports by the value found in a specified field or control? Normally the form will sort according to record number, and that is just not going to work as the records were entered not in the order I would like to have them viewed. The Order By in the form's property window appears to do nothing when I enter the control's name in it. Just note that you can base the Form on a Query sorted appropriately, and it will use that order with no code at all. The form's OrderBy property can be used to override this sort if you choose. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|