Connecting Tech Pros Worldwide Help | Site Map

How to spell check one field, in one record

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 1st, 2008, 01:15 PM
Lynx101
Guest
 
Posts: n/a
Default How to spell check one field, in one record

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

  #2  
Old July 1st, 2008, 02:15 PM
Lynx101
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.