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
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