Spell checker

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to check a form for spelling when the user quits the form. Is there
any other way, besides using sendkeys to suppress the "spell checking
complete" message box that pops up at the end of the checking. Obviously this
is only a concern when there are no mistakes so the spellchecker doesn't pop
up.

Thanks for any help
PJ
 
PJ said:
I want to check a form for spelling when the user quits the form. Is there
any other way, besides using sendkeys to suppress the "spell checking
complete" message box that pops up at the end of the checking. Obviously this
is only a concern when there are no mistakes so the spellchecker doesn't pop
up.


MikeB explained that just a few days ago, so I know the
answer now.

. . .
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd,SetWarnings True
 
Marsh said:
MikeB explained that just a few days ago, so I know the
answer now.

. . .
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd,SetWarnings True

Just a thought, but the above code will spell check every
record in the form record source.

To only check the spelling of the current record you will
first have to select it. For example with code that jumps
from control to control. If the control has text, then
select, then spellcheck.

For example:

dim ctl as Access.control

for each ctl in Controls
with ctl
if .controltype=actextbox then
..selstart=0
..sellength=len(.text)
end if
end with
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
doevents
next ctl

Luck
Jonathan
 
Jonathon, is that the way to get it to only check individual text fields.
Because I have used "DoCmd.RunCommand acCmdSpelling" and it wanders off and
checks all the TextBox'es on the form. I have an unbound form, so I don't
have to worry about "all the records in the form's source".

Bruce.
************
 
Back
Top