How do you disable sorting?

Me!User

Registered User.
Local time
Today, 06:41
Joined
Mar 10, 2004
Messages
34
Can you disable sorting?

Sort Ascending and Sort Descending are found in the following locations:

  1. In the main menu under Records.
  2. In the Form View toolbar.
  3. In the right-click menu.

Customizing the menu and toolbar is a partial solution because the right-click menu will continue to offer sorting. Is there no straightforward way of indicating "Sorting=False" for a given form?
:confused:
 
Last edited:
Don't know the answer to your final question, but you can replace the right-click popup menu with a custom menu that only offers the features you want present. The problem with many of the options that you can set for a DB is that the user's settings, not what you select on your machine , are what are actually present when they run the DB. There is program code to set these features when a DB is opened to work around this, but that's really getting deep code wise. You have to assign the user's machine original settings, change the settings, and before your DB closes, set the user's machine back to his selected settings.

The Missinglinq
 
Sorry, had to find code to illustrate the above. The following shows an example of what the developer has to do to change a user's settings when running a given DB. In this case I wanted the The "On Entering Fiels" behavior to be set to go to beggining of field.




Private Sub Form_Open(Cancel As Integer)
'Get current On Enter setting so that you can reset as program exits
intEntryBehavior = Application.GetOption("Behavior Entering Field")
'Set On Enter behavior to "Go to beginning of field"
Application.SetOption "Behavior Entering Field", 1
End Sub

Private Sub Form_Close()
'Resets On Enter behavior to pre-program setting
Application.SetOption "Behavior Entering Field", intEntryBehavior
End Sub

The Missinglinq
 
That's for that lead! It's a shame it isn't as simple as disabling Filters! I'll start with your code and write something to get the desired result.
 
Apparently if you have Access 2007, customizing right click menus (Shortcut Menu) either involves code, or you have to open it in Access 2003 and customize the menu from there. You can then pick the shortcut menu for Current Database or for Form Properties.

In Access 2003, you go to View, Toolbars, then Customize. Select the Toolbars tab, then create a new menu. Click properties, then from the Type dropdown list, pick "Popup". After that, go back to the Toolbars tab, then check "Shortcut Menus" to get the entire list of all menus. Custom menus appear on the very right hand side. You have to drag commands from the predefined trees over to your custom menu's tree.
 
For any form you can completely dissable the right click menu, or create your oun.
You can also create your oun Toolbar and assign it to a form.

Regarding the menu you will have to create your oun, and use some code to set it to replace the original one.
 

Users who are viewing this thread

Back
Top Bottom