[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Disable Sorting on a Continuous Form

Posted on 2006-05-11
5
Medium Priority
?
495 Views
Last Modified: 2008-02-26
I have a main Form, with a Subform on it. The subform shows Transactions, which are calculated to acheive a running balance. If a user right clicks, and sorts this form, the calculations are not correct.

How can I disallow sorting on this form? I do want to sort data on the main form, just not on the subform.

From what I see, a user can click a record on the subform, and use the toolbar at the top of the screen to sort, or a user can right click a field and sort ascending/descending.

I need to disable both methods for the continuous subform.

Thanks! - AB
0
Comment
Question by:abinboston
  • 4
5 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 16663531
abinboston,

You can disable the right click menus for your application altogether:

CurrendDB.Properties("AllowShortcutMenus") = False

This is a startup option, and will take effect the nextt time the DB is opened.

0
 
LVL 61

Expert Comment

by:mbizup
ID: 16663554
You can also set up a dummy right-click menu for that specific form and then disable the dummy menu.  That would only affect the forms you associate the right click menu with:

Tools -> Customize -> New Menu  (give  it a name)
Click the properties button, and select "pop up"
Close out of the customize window.
In your form's Short Cut Menu property, select the name of your new short cut menu.
To disable it through VBA:

CommandBars("ShortCutMenuName").Enabled = False
0
 

Author Comment

by:abinboston
ID: 16663876
To disable it through VBA:

CommandBars("ShortCutMenuName").Enabled = False


Thanks - sounds like that will work... where do I disable it?
when opening the form, or on click? or whenloading a main menu? or??

Thanks - Anthony
0
 
LVL 61

Expert Comment

by:mbizup
ID: 16664049
Hi Anthony,

If you have workgroup security, you could disable it in a command button which is visible only to certain users...

However, rereading your post... If you don't have the need for a custom sort menu like that, rather than creating a custom shortcut menu just disable the built-in one for your subform through the properties sheet:

Under the "Other" tab, set "Shortcut Menu" to No.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 1000 total points
ID: 16664155
Your users also have 2 options for sorting at the top of the screen.  One one the Form View toolbar and another in Records -> Sort  in Access's built-in menubar.

You can suppress these toolbars so that the user can only sort through the right-click menu on the main form.  
- Tools -> Customize ... Uncheck the Form View toolbar  

'This will suppress the built-in menubar
- Tools -> Customize -> New  (Call the new toolbar mnuBlank)
- Click the properties button, and select Menu Bar for the type.  
- In your main form and subform's properties, select mnuBlank  for the Menu Bar property (under the  "Otter" tab).
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question