Rob Kraft's Software Development Blog

Software Development Insights

Archive for February, 2021

Disable Right-Click Menus in Microsoft Access But Keep the Copy/Paste Menus

Posted by robkraft on February 26, 2021

I hope someone comments on this article to tell me that there is a better solution. I was unable to find it. The application requirements were:

  • Hide the right-click menus on the form and report title bars (shown below) to prevent users from entering “Design View”
  • Keep the right-click menus with textbox controls (shown below) to allow users to use it for Copy and Paste.

Microsoft Access has an option in the Current Database tab of Options to disable all the right-click menus and that option is called “Allow Default Shortcut Menus”. However, when I unchecked that, I could not figure out a way to enable the right-click menus solely within textbox controls to allow Copy and Paste.

My solution is to keep this option (“Allow Default Shortcut Menus”) set to checked (true), then run some code as the users open the application in AutoExec to disable the right-click on the form and report headers. I found no documentation that clearly described how to disable the right-click on the form headers, but with much trial and error I found that if I disabled all CommandBars that did not have a name, I got the result I was looking for.

Private Sub DisableCommandMenus()
    For Each Item In CommandBars
        If Item.Enabled = True Then
            'The menus we want to disable are those that don't have names
            If Trim(Item.Name) = "" Then
                Item.Enabled = False
            End If
        End If
    Next
End Sub

The code above disables menus that don’t have names. It is possible that I will need to disable more of the CommandBars, but at the moment my solution appears to be complete.

Do you know of a better solution to this?

Posted in Access, Coding | Leave a Comment »

Programmatically Invoke Microsoft Access SpellChecker using VBA – acCmdSpelling

Posted by robkraft on February 25, 2021

Microsoft Access has a built-in ability to run a spellcheck on your controls. It works best to call the VBA code to perform the spellcheck from the Exit method of the controls. I recommend calling DoCmd.SetWarnings to False prior to running the spellcheck because this will suppress “The spelling check is complete” message box from showing if there are not spelling errors in the control.

Private Sub Text5_Exit(Cancel As Integer)
    MySpellCheck Me!Text5
End Sub

Private Sub Text8_Exit(Cancel As Integer)
    MySpellCheck Me!Text8
End Sub

Private Sub MySpellCheck(ctl As Control)
    DoCmd.SetWarnings False
    With ctl
        .SetFocus
        If Len(.Value) > 0 Then
            .SelStart = 1
            .SelLength = Len(.Value)
            DoCmd.RunCommand acCmdSpelling
            .SelLength = 0
        End If
    End With
    DoCmd.SetWarnings True
End Sub

Posted in Access, Coding | Leave a Comment »

Trello Removes Feature for Creating Personal Board – A Setback From Their Atlassian Acquisition

Posted by robkraft on February 10, 2021

I discovered today that Trello no longer supports personal boards.  When you create a new board you need to create it within a Team first (teams will be renamed workspaces).

You can get around this by just creating your own team, perhaps name your team Personal.  But I see this as the first of many steps where Atlassian is re-purposing a popular tool for personal time management into a product optimized for users of other Atlassian products.  It is sad when a good product is acquired by another company then altered for different end users.

As I suspect more changes in the future, probably even pricing related, I am hunting for alternatives to Trello now.  There is a good list of some in this article:  The 17 Best Trello Alternatives in 2021 (In-Depth Comparisons) (kinsta.com)

Asana and Wrike are a few good alternatives.

Here is Atlassian trying to put a positive speed on their product degradation: Why can’t I create a board outside of a team anymore? – Trello Help

Posted in Project Management, Web Sites | Leave a Comment »