Spelling Check on a Text Box

B

Bruce Rodtnick

I came across this neat code on using a spell check on a text box:

Private Sub txtProject_LostFocus()
If Len(Me!txtProject & "") > 0 Then
With Me!txtProject
.SetFocus
.SelStart = 0
.SelLength = Len(Me!txtProject)
End With
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
End If
End Sub

It works GREAT...except...if I want the spell checker to ignore the
word, I can't hardly get out of the text box. "Ignore" doesn't clear me
out of the text box and when I want to move off the record or to another
text box, it tries to spell check again. I tried a DoCmd.GotoObject
"Next Text Box" at the end of the code, but if I'm just moving from
record to record via navigation arrows, I have to hit the arrow twice,
once to move off txtProject and another time to change the record.

Any ideas how work around this?

Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top