Solved

Access 2007 filter/sort arrow in datasheet

Posted on 2009-03-31
9
467 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

615 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