Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

Access Spell Check


I have a client that wants to use spell check on all of their letters, memos, and anything else they send out of the office.  However, all my attempts to use Access's spell checker have failed because the queries behind the forms are NOT updatable.  I have been able to copy text into MS Word and check it there, but this process is to slow to implement.  Is there a work-around to get the spell checker to run, or some other solution that I haven't thought of?
  • 3
2 Solutions
would this help

DoCmd.RunCommand acCmdSpelling

you can use this on the event handlers (afterupdate eg) of a textbox

What I meant to say in terms of textbox

Could you present your text as shown on a letter in a memo field of some sort, massive textbox
then use the access spell checker there?

u may need to perhaps place in temp table, update then have code to update original if u cant edit the query behind the form
MarkRodAuthor Commented:

Placing the text into a temp table has crossed my mind, but when I tried it I found you have to have the table open to run the spell check.  This is unacceptable because the users would see the table.  
No, u can create a form which is bounded to the table

You will need to generate some ID so when u load the form, u ensure the right record is loaded
This form will load that record straight away and user will not be able to add or delete

then on the afterupdate function of that textbox, u can perform a spellcheck

Hello MarkRod

You could create a small form with only a single large textbox (and OK/Cancel buttons). When your code needs to check the  spelling of any text, load that form, fill the unbound text box with whatever you want to check, select it and RunCommand acCmdSpelling. Proceed (the code stops during the spell check) with reading the text box content back and closing the pop-up form.

Could be as simple as this:

Global gstrSpelling As String

    gstrSpelling = "This migt contain an eror or two!"
    DoCmd.OpenForm "fmodSpellCheck", WindowMode:=acDialog
    MsgBox gstrSpelling

The form's module contains just this (and the form's timerinterval is set to 1)

Option Explicit

Private Sub cmdCancel_Click()
    DoCmd.Close acForm, Me.Name
End Sub

Private Sub cmdOK_Click()
    gstrSpelling = Me.txtCheckSpelling
    DoCmd.Close acForm, Me.Name
End Sub

Private Sub Form_Load()
    txtCheckSpelling = gstrSpelling
End Sub

Private Sub Form_Timer()
    Me.TimerInterval = 0
    RunCommand acCmdSpelling
End Sub

You could get a little more fancy, as with a button "Spell Check" to check again after  a manual edit, etc, and also some code to detect the use of  "Cancel"...

Good luck!

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!

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