Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Fri Dec 21 09:54:12 CST 2007
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
.