mreinsmith
New member
- Local time
- Today, 14:08
- Joined
- Nov 25, 2024
- Messages
- 6
Here is the code I am using to do a Spell Check on a Form Field
Any time I move/tab out of the field I have to do it twice
How can I avoid this problem?
Thanks
Code:
Private Sub Title_Exit(Cancel As Integer)
Call SpellCheckControl(Me, Title)
End Sub
Code:
Public Sub SpellCheckControl(frm As Form, ctl As Control)
With Forms(frm.Name).Controls(ctl.Name)
.SetFocus
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
Any time I move/tab out of the field I have to do it twice
How can I avoid this problem?
Thanks