Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

How to spell check one field, in one record

Question posted by: Lynx101 (Guest) on July 1st, 2008 01:15 PM
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
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Lynx101's Avatar
Lynx101
Guest
n/a Posts
July 1st, 2008
02:15 PM
#2

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

 
Not the answer you were looking for? Post your question . . .
184,182 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors