spell checker

stu_c

Registered User.
Local time
Today, 11:05
Joined
Sep 20, 2007
Messages
494
hi all
I have got two text boxes that I want automatically spell checked on update any suggestions?
TXTBOX1
TXTBOX2

I have tried the below code but seems to search all other records rather than just the one I am on?

Code:
Private Sub TXTBOX1_AfterUpdate()
'If the textbox contains data run the
'Spell Checker after data is entered.
    If Len(Me!TXTBOX1 & "") > 0 Then
        DoCmd.RunCommand acCmdSpelling
            Else
        Exit Sub
    End If
End Sub
 
you need to select the text

this works for me


Code:
Private Sub City_AfterUpdate()

    If Nz(City, "") <> "" Then
        With City
             
             .SetFocus
             .selstart = 0
             .SelLength = Len(City)
        
        End With
        
        DoCmd.SetWarnings False
        DoCmd.RunCommand acCmdSpelling
        DoCmd.SetWarnings True

    End If

End Sub
 
hi mate thanks for the above code, it works great to spell check the text box but when a word in incorrect and pops up with the window with suggestions, once this has been changed and click OK it then goes onto the next text box on the form :/
 
If you want it to stay on the same control to check other words you might need to use the before update event and use the .text property, or perhaps modify the code to include some sort of loop until there are no words left to spell check. Maybe split the text on " " and highlight each word in turn

I don't have time to experiment on your behalf today, have paying clients to keep happy. Spell checker is not something I use - I found the bit of code I provided by simply googling your question. Perhaps google yourself or maybe someone else can step in.

Good luck
 
I have a pop-up spell checker form available on my website here:- Spell Checker Popup Form

There are video instructions demonstrating how it works, and how to add it to your database. The normal price is $2.99, however for a limited time you can download it for free using the coupon code DownloadALL4Fr33
 
...once this has been changed and click OK it then goes onto the next text box on the form :/
Just to be clear...is your complaint that Focus moves to the next Textbox on the Form...or that it moves to the next Textbox and tries to SpellCheck that Control as well?

Linq ;0)>
 
freshly made just for you.
custom-made spell checker.
 

Attachments

Users who are viewing this thread

Back
Top Bottom