Thanks, Arvin. The problem I'm running into, though, is that the client
wants to check only a particular field, but for all records (in Continuous
Forms view) at once, not as each record is edited. I could change your code
below to use the control name for that one control, instead of the control
type. But the problem remains that it would still only check for that one
record.
I proposed to the client checking the spelling of that one field as it's
edited. He said that's fine, except that the spell checker comes up EVERY
time, even if there are no spelling mistakes. He doesn't like that.
So I'm left with two options: 1) find a way to run the spell checker for all
records in the form, but only for a particular field in each record; or 2)
find a way to have the spell checker pop up after that particular field is
edited, but only if there's a spelling error.
I guess there's a third option: find a third-party spell checker that
provides more programmatic control.
Thanks!
Neil
"Arvin Meyer [MVP]" <a@m.comwrote in message
news:ec**************@TK2MSFTNGP04.phx.gbl...
The following code, when placed in a module can be called from a button on
a form. It will spell check only the text boxes on that form.
Public Function Spell()
' Arvin Meyer 9/17/1998
' Adapted from code by Terry Wickenden
Dim ctlSpell As Control
Dim frm As Form
Set frm = Screen.ActiveForm
DoCmd.SetWarnings False
' Enumerate Controls collection.
For Each ctlSpell In frm.Controls
If TypeOf ctlSpell Is TextBox Then
If Len(ctlSpell) 0 Then
With ctlSpell
.SetFocus
.SelStart = 0
.SelLength = Len(ctlSpell)
End With
DoCmd.RunCommand acCmdSpelling
End If
End If
Next
DoCmd.SetWarnings True
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"Neil" <no****@nospam.netwrote in message
news:_z*****************@newssvr21.news.prodigy.ne t...
>Is there way to have control over the MS-Access spell checking (besides
just launching it)? We want to tell it to check all records, but skip
certain fields (or, alternatively, ONLY check certain fields). Is that
possible?
Alternatively, if that's not, we noticed that the spell checker skips
fields that are disabled. So one could disable the fields to be skipped;
run the spell checker; and then re-enable those fields when done. But how
would one know when it's done.
Any ideas/suggestions/hints/etc.?
Thanks,
Neil