Solution: Spellcheck a single text box (1 Viewer)

Kenny

Registered User.
Local time
Today, 20:36
Joined
Mar 1, 2002
Messages
14
I have been trawling this site for a solution to the problem of spellchecker checking all records and fields without success.

I have however used a bit of code to resolve the issue (For me anyway):

Mytextbox.SetFocus
SendKeys "{f2}^+{home}{f7}"

This may or may not be significant, however after two days of trial and error I felt pleased with myself.

I have discovered that if you only use a single SendKeys statement then the number lock does not de-activate.

I hope this will be of use to others and may payback for the 800 or so solutions I have gained from this excellent forum.
 
R

Rich

Guest
Why not use
DoCmd.RunCommand acCmdSpelling ? which is going to be far more reliable than send keys, add it to the double click event
 

Kenny

Registered User.
Local time
Today, 20:36
Joined
Mar 1, 2002
Messages
14
When I use DoCmd.RunCommand acCmdSpelling the spell check moves on from the text box and checks all fields in all records, there are around 20000 records at any one time.

The reason for using send keys was that it was the only way I could replicate the action of manually highlighting the text as opposed to the text box.

Even when the text is manually highlighted and the DoCmd.RunCommand acCmdSpelling code is used it hops to the next field.

I found the whole spellchecker/sendkeys very temperamental and tried about 30 scenarios, this was the only one to stop the function after the selected box had been checked.

However I am discovered that sendkeys are evil (for good reason)but I could find no alternative.
 

Users who are viewing this thread

Top Bottom