• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1140
  • Last Modified:

Spell check in Access 2010 VBA

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
  • 2
1 Solution
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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).
paulmcneilAuthor Commented:
What I found works is making the OnLostFocus event of the textbox control call mu sub CheckSpell which is RunCommand acCmdSpelling.
paulmcneilAuthor Commented:
Found my own solution

Featured Post

Industry Leaders: 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!

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