Hi, I have an access 2003 data base and have been using a spell checker through some VBA code (that I downloaded) on the "On exit" event. The spell checker has been working fantatstically on a normal form.
The form was starting to get very busy, so I added tabs (tabbed form) and moved most of the fields into the tabs. Unfortunetly, the spell checker no longer works.
For a start, the event window no longer shows that the "On exit" event has a code. When I open the "On exit event" the VBA code is still there. I exit the VBA code editor and the "On exit" event now shows that there is code there.
But!!! when I place text in the filed in form view, the spell checker works but I can't get out of this field??
Here is the VBA code:
--------------------------------------------
Private Sub Safety_Exit(Cancel As Integer)
Dim strSpell
strSpell = Safety
If IsNull(Len(strSpell)) Or Len(strSpell) = 0 Then
Exit Sub
End If
With Safety
.SetFocus
.SelStart = 0
.SelLength = Len(strSpell)
End With
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
End Sub
--------------------------------------------
I am fairly new to VBA code so any help would be appreciated.
Thanks
The form was starting to get very busy, so I added tabs (tabbed form) and moved most of the fields into the tabs. Unfortunetly, the spell checker no longer works.
For a start, the event window no longer shows that the "On exit" event has a code. When I open the "On exit event" the VBA code is still there. I exit the VBA code editor and the "On exit" event now shows that there is code there.
But!!! when I place text in the filed in form view, the spell checker works but I can't get out of this field??
Here is the VBA code:
--------------------------------------------
Private Sub Safety_Exit(Cancel As Integer)
Dim strSpell
strSpell = Safety
If IsNull(Len(strSpell)) Or Len(strSpell) = 0 Then
Exit Sub
End If
With Safety
.SetFocus
.SelStart = 0
.SelLength = Len(strSpell)
End With
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
End Sub
--------------------------------------------
I am fairly new to VBA code so any help would be appreciated.
Thanks