PDA

View Full Version : automating spell-check



eed
10-25-2004, 09:26 AM
Hi, all,

I'd like to set the On Exit code for a particular field to run the Spell Checker when the user is done entering text. But once you start the Spell Checker, it not only checks every field in the current record, it checks all fields in all the records of the current recordset. That's annoying and time-consuming.

Is there a way to limit the Spell Check command, so it will only spell check the current field or at least the current record?

Much thanks in advance! :kiss

CBrine
11-02-2004, 11:16 AM
eed,
It took a little hunting, but I found a way to do this. You need to set focus to the text box you want to execute the spellcheck on, then run the spell check command. I tested this on access 2003.

HTH
Cal

Text0.SetFocus
DoCmd.RunCommand acCmdSpelling

eed
11-02-2004, 11:48 AM
I tested this on access 2003.

Thanks, CBrine, but this didn't seem to work in Access 2000. It does seem to check only the field specified, but it checks that field for every record in the current recordset.

I also tried a solution described here -- http://www.experts-exchange.com/Databases/MS_Access/Q_21039219.html -- which involved using MS Word to spellcheck a selection of text in Access. It hosed up my database pretty bad.

It just seems silly that there isn't a way to ask it to spell check only one field or one record, as opposed to the whole recordset (or one column in a recordset, as the SetFocus appeared to do for me...).

CBrine
11-02-2004, 02:26 PM
My only thought might be to have a hidden textbox on your form somewhere, and when the spell check is selected, copy the current record data to that unassociated textbox, set the focus, run the spell check, then set the focus back to the original field. Don't know if this will work or not, but it's what I would suggest you try next.

HTH
Cal