Connecting Tech Pros Worldwide Forums | Help | Site Map

How to spell check one field, in one record

Lynx101
Guest
 
Posts: n/a
#1: Jul 1 '08
I've got the following code to work, but the problem is that it is
check all fields on every record. Is there a way to make this work on
one particular field AND only the current record?


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

Many thanks

Lynx101
Guest
 
Posts: n/a
#2: Jul 1 '08

re: How to spell check one field, in one record


Resolve by using the following adaptation of the above code:


If Len(Me.YOURFIELDNAME & vbNullString) 0 Then
With me.YOURFIELDNAME
..SetFocus
..SelStart = 0
..SelLength = Len(.Text)
End With
DoCmd.RunCommand acCmdSpelling
end if
Closed Thread