By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,143 Members | 1,919 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,143 IT Pros & Developers. It's quick & easy.

Controlling Spell Checker

P: n/a
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
Apr 7 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
For the controls that you want to omit from the spell check, goto Properties
Other and enter “skip” (without the quatation marks) in the Tag Property.


Private Sub SpellCheckLimited_Click()
Dim ctrl as Control

For Each Ctrl In Me.Controls
If TypeOf Ctrl Is TextBox Then

If Ctrl.Tag = "skip" Then
Ctrl.Enabled = False
End If

End If
Next

DoCmd.RunCommand acCmdSpelling

For Each Ctrl In Me.Controls
If TypeOf Ctrl Is TextBox Then

If Ctrl.Tag = "skip" Then
Ctrl.Enabled = True
End If

End If
Next
End Sub

When it's done you'll get a popup box with default "Spell Check Complete."
You could, of course, reverse the process by using

If Ctrl.Tag <"skip" Then

to disable/enable the fields not so tagged.

Good Luck!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200704/1

Apr 7 '07 #2

P: n/a
Those first two lines of my post should read:

For the controls that you want to omit from the spell check, goto Properties -
Other and enter “skip” (without the quatation marks) in the Tag Property.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200704/1

Apr 7 '07 #3

P: n/a
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

Apr 7 '07 #4

P: n/a
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


Apr 8 '07 #5

P: n/a
Neil wrote:
"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."

My code posted above does exactly what you want, Neil. Have you tried it out?

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200704/1

Apr 8 '07 #6

P: n/a
Hello. I just saw your post. Since my original message was cross-posted, but
you only responded in this newsgroup, I didn't see your message because I
was looking in another newsgroup.

So, yes, your solution would work. Thanks for that.
"missinglinq via AccessMonster.com" <u28780@uwewrote in message
news:706090214e250@uwe...
Neil wrote:
"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."

My code posted above does exactly what you want, Neil. Have you tried it
out?

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200704/1

Apr 17 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.