Solved

Access 2007 filter/sort arrow in datasheet

Posted on 2009-03-31
9
455 Views
Last Modified: 2012-08-14
Hi Experts

In 2007 they have included a new function to the coloums in a datasheet. It's an arrow that can sort and filter. But I would like to remove it, permenatly. Can I do it with VBA code?
0
Comment
Question by:DCRAPACCESS
  • 4
  • 3
  • 2
9 Comments
 
LVL 28

Expert Comment

by:TextReport
ID: 24027437
This is controlled by the ShortCutMenu property of the form, set it to NO.
Cheers, Andrew
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24027499
From what Andrew says, this faq confirms it http://accessjunkie.com/faq_53.aspx
Any reason why you would want to do it in vba?
0
 

Author Comment

by:DCRAPACCESS
ID: 24027544
What if the database are used in both 2003 and 2007. What will that do to the settings? That is why i would like to control it i VBA, to be sure that it's turn off in 2007.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24027557
shortcut menu switched off in 2003 will merely do nothing when you right click on the form
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 65

Expert Comment

by:rockiroads
ID: 24027562
in vba, you can try this to switch it off

me.shortcutmenu = false

0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24027574
Mind you, that code works fine in 2003 but not in 2007
0
 
LVL 28

Accepted Solution

by:
TextReport earned 500 total points
ID: 24027593
The problem is that it will also disable the built-in Shortcut Menubar, the problem is by the time the OnOpen is executed you can turn off the Shortcut menu and it does disble the Shortcut menu but not the dropdown.
Cheers, Andrew

PS You could reverse the logic to see if turning it OFF by default and enabling in previous versions would work.
Private Sub Form_Open(Cancel As Integer)

    If SysCmd(acSysCmdAccessVer) >= "12.0" Then

       Me.ShortcutMenu = False

    End If

End Sub

Open in new window

0
 
LVL 28

Expert Comment

by:TextReport
ID: 24027612
Heres the reverse logic. Just though you may get a string comparison here so v9 would be after v10
Cheers, Andrew
Private Sub Form_Open(Cancel As Integer)

    If Val(SysCmd(acSysCmdAccessVer)) < 12 Then

       Me.ShortcutMenu = True

    End If

End Sub

Open in new window

0
 

Author Comment

by:DCRAPACCESS
ID: 24027623
Thanks! Just what I was looking for.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now