Spell Check Help

B

bladelock

I have this code in the AfterUpdate in a TextBox set for a memo:

If Len(Me!casefacts & "") > 0 Then
DoCmd.RunCommand acCmdSpelling
Else
Exit Sub
End If

everytime the spell check executs, it check the whole form. How can I get it
to just check that one textbox and not everything else.
 
M

Marshall Barton

bladelock said:
I have this code in the AfterUpdate in a TextBox set for a memo:

If Len(Me!casefacts & "") > 0 Then
DoCmd.RunCommand acCmdSpelling
Else
Exit Sub
End If

everytime the spell check executs, it check the whole form. How can I get it
to just check that one textbox and not everything else.


You need to select the text to be spell checked:

If Len(Me!casefacts & "") > 0 Then
Me!casefacts.SelStart = 0
Me!casefacts.SelLength = Len(Me!casefacts)
DoCmd.RunCommand acCmdSpelling
Else
Exit Sub
End If
 

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