Full Version: Spelling checking
UtterAccess Forums > Microsoft® Access > Access Forms
Hi all,
I have below line for spelling checking :
DoCmd.RunCommand acCmdSpelling
but wondered whether it is possible to check a certain txt box. I have 3 boxes on my form and I would only like to check it on one particular box.
Many thanks,
Try setting the focus to the text box you want to run the spell check on.
This will check the field as you exit it
Private Sub YourTextFieldName_Exit(Cancel As Integer)
With Me!YourTextFieldName
  If Len(.Value) > 0 Then
    DoCmd.SetWarnings False
    .SelStart = 1
    .SelLength = Len(.Value)
    DoCmd.RunCommand acCmdSpelling
     .SelLength = 0
    DoCmd.SetWarnings True
  End If
End With
End Sub
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.