Spell checker

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
 
M

Marshall Barton

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
 
J

Jonathan Parminter

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
 
G

Guest

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.
************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top