Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 484
  • Last Modified:

Access 2007 filter/sort arrow in datasheet

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
DCRAPACCESS
Asked:
DCRAPACCESS
  • 4
  • 3
  • 2
1 Solution
 
TextReportCommented:
This is controlled by the ShortCutMenu property of the form, set it to NO.
Cheers, Andrew
0
 
rockiroadsCommented:
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
 
DCRAPACCESSAuthor Commented:
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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
rockiroadsCommented:
shortcut menu switched off in 2003 will merely do nothing when you right click on the form
0
 
rockiroadsCommented:
in vba, you can try this to switch it off

me.shortcutmenu = false

0
 
rockiroadsCommented:
Mind you, that code works fine in 2003 but not in 2007
0
 
TextReportCommented:
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
 
TextReportCommented:
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
 
DCRAPACCESSAuthor Commented:
Thanks! Just what I was looking for.
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now