In this example, the field we are spell checking is called "comments". VBA CODE: With Me!Comments .SetFocus If Len(.Value) > 0 Then .SelStart = 1 .SelLength = Len(.Value) DoCmd.SetWarnings False DoCmd.RunCommand acCmdSpelling DoCmd.SetWarnings True .SelLength = 0 End If End With NOTE: the docmd.setwarnings is there so that you don't get the "spell check complete" popup message box that normally would come up when the spell checker runs. That message is nice when the spell checker actually finds a misspelled word, but you normally would get that same message when the spell checker runs and doesn't find any errors. So in this case we preferred to supress it. |
VBA >