Hello - this is a great forum as I have obtained many useful event procedure codes to enhance our access based content management system. I am hoping that somebody can help me out to streamline the below code for what I'm trying to accomplish.
I am trying to force our copywriters into using a spell-check when they exit specific form based fields. I have obtained the below code on a forum on here and it is working.
The problem is that our form has numerous fields (title, short description, features and product type specific attributes). Using the code below it auto-runs the spell check when i click out of the field I specified, but this code will not allow me to click into another field to proceed with data entry after the fact.
Ideally I want to have the auto spell check launch for each field in the form after they populate the content and click out to enter the next field in the form. Any help that can be provided would be very much appreciated.
Private Sub YOURFIELDNAME_Exit(Cancel As Integer)
Dim strSpell
strSpell = YOURFIELDNAME
If IsNull(Len(strSpell)) Or Len(strSpell) = 0 Then
Exit Sub
End If
With YOURFIELDNAME
.SetFocus
.SelStart = 0
.SelLength = Len(strSpell)
End With
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
End Sub
I am trying to force our copywriters into using a spell-check when they exit specific form based fields. I have obtained the below code on a forum on here and it is working.
The problem is that our form has numerous fields (title, short description, features and product type specific attributes). Using the code below it auto-runs the spell check when i click out of the field I specified, but this code will not allow me to click into another field to proceed with data entry after the fact.
Ideally I want to have the auto spell check launch for each field in the form after they populate the content and click out to enter the next field in the form. Any help that can be provided would be very much appreciated.
Private Sub YOURFIELDNAME_Exit(Cancel As Integer)
Dim strSpell
strSpell = YOURFIELDNAME
If IsNull(Len(strSpell)) Or Len(strSpell) = 0 Then
Exit Sub
End If
With YOURFIELDNAME
.SetFocus
.SelStart = 0
.SelLength = Len(strSpell)
End With
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
End Sub