Solved

Access 2007 filter/sort arrow in datasheet

Posted on 2009-03-31
9
458 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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
 
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

813 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

17 Experts available now in Live!

Get 1:1 Help Now