[AccessD] Spell Check

Kevin Waddle thewaddles at sbcglobal.net
Sat Dec 22 00:12:21 CST 2007


Rocky,

Comment out the line...
'DoCmd.GoToRecord , , acFirst
And it will start from the current record.

By the way, nice code!

HTH,
Kevin

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Friday, December 21, 2007 7:54 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Spell Check

Dear List:
 
I have a spell check in an app built-in to a command button - spell checks
one text field on a continuous bound form.  It works well, except that there
doesn't seem to be a way to interrupt it once it's started.  I tried a few
different events thinking I could set a tag in a control, and, in the spell
checking loop, look for a change in the tag.  But nothing seems to trigger
while it's in the loop.
 
I've modified the routine to spell check only the current record.  But it
would be nice to be able to spell check forward from the current record to
the end of the recordset but give the user a way to escape if the
accidentally start the spell check and want to abort it.  Spell checking the
whole recordset at the moment takes about 10 minutes.
 
Any ideas?
 
Here's the code.  It's pretty simple:
 
    DoCmd.GoToRecord , , acFirst
    Do While Me.NewRecord = False
        Me.TimeEntryNarrative.SetFocus
        Me.TimeEntryNarrative.SelStart = 0
        If Not IsNull(Me.TimeEntryNarrative) Then
            Me.TimeEntryNarrative.SelLength = Len(Me.TimeEntryNarrative)
            DoCmd.SetWarnings False
            DoCmd.RunCommand acCmdSpelling
            DoCmd.SetWarnings True
        End If
        DoCmd.GoToRecord , , acNext
    Loop

 
MTIA,
 
Rocky
.
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list