"Nick 'The Database Guy'" <ni*****@btinternet.comwrote in
news:11**********************@l12g2000cwl.googlegr oups.com:
I am fully aware of the F7 spell check in access, and I am also aware
that this can be automated with the statement,
SendKeys "{F7}"
Some developers consider SendKeys to be dangerous in that the send might
end up in some other currently running application or some other Access
window. I've never seen this happen and doubt that it's more than a bourbon
myth but I avoid SendKeys because IMO SendKeys is an ugly hack created for
the rescue of the lazy, the incompetent and the indifferent.
You might try
With DoCmd
.SetWarnings False
.RunCommand acCmdSpelling
End With
The help file says:
"If you turn the display of system messages off in Visual Basic, you must
turn it back on, or it will remain off, even if the user presses CTRL+BREAK
or Visual Basic encounters a breakpoint."
If the help file is correct (a 50-50 possibility) then somewhere, sometime
one should do:
DoCmd.SetWarnings True
I wouldn't know as I never mess with SetWarnings. If I had a gnarly text
box or memo where spelling is a problem I would be inclined to have a
nearby label with the caption:
"<F7to check spelling."
When one respects users and places the responsibility for proper data entry
on their shoulders one is usually rewarded with good data entry.
A good Access application is marked by its simplicity. Magic buttons are
great for laughs and termination justification.