Spell check in Access 2010 VBA

Posted on 2012-09-04
Last Modified: 2012-10-23
I get runtime err 2046, the command or action ‘spelling’ isn’t available now.

when I run the following code in AfterUpdate property of a memo field.

Private Sub DegreeofAttainment_AfterUpdate()
'If the text/memo contains data run the
'Spell Checker after data is entered.
    If Len(Me!DegreeofAttainment & "") > 0 Then
        DoCmd.RunCommand acCmdSpelling
        Exit Sub
    End If
End Sub
Question by:paulmcneil
    LVL 84
    Make sure you set the Focus on the control, just to be sure:


    Also, SpellCheck must be installed (it's installed with Office, not Access) and you cannot do this in the Runtime environment (i.e. if you're running Access Runtime vs the full retail version of Access).

    Accepted Solution

    What I found works is making the OnLostFocus event of the textbox control call mu sub CheckSpell which is RunCommand acCmdSpelling.

    Author Closing Comment

    Found my own solution

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
    PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
    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…
    The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

    729 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

    18 Experts available now in Live!

    Get 1:1 Help Now