Tyler,
Why not try the procedure written by Arvin Meyer, which I posted in the message dated 9/21/2004
at 3:24 PM? This procedure is designed to check the spelling for all textbox controls on a form.
Just drop a copy of Public Function Spell() into a new module, and call it from command buttons
on whatever form you wish, ie:
Private Sub cmdSpell_Click()
Call Spell
End Sub
It doesn't get much simpler that this....
Tom
_____________________________________________
Hello, Im a new commer to this forum but here goes my lil trouble. I am not really good at
programming as of yet and I am looking to have a spell check button on my Form for the Current
pages for all the field on the page. Here is the code I am using:
Code:
Private Sub cmdSpell_Click()
On Error Resume Next
Dim ctlSpell As Control
' Check the spelling in the selected text box
Set ctlSpell = Screen.PreviousControl
If TypeOf ctlSpell Is TextBox Then
If IsNull(Len(ctlSpell)) Or Len(ctlSpell) = 0 Then
MsgBox "There is nothing to spell check."
ctlSpell.SetFocus
Exit Sub
End If
With ctlSpell
.SetFocus
.SelStart = 0
.SelLength = Len(ctlSpell)
End With
DoCmd.RunCommand acCmdSpelling
Else
MsgBox "Spell check is not available for this item."
End If
ctlSpell.SetFocus
End Sub
My problem is this here: "Set ctlSpell = Screen.PreviousControl" what should I set it to so that
it spell checks from one Text and the ones that follow it?
*****************************************
* A copy of the whole thread can be found at:
*
http://www.accessmonster.com/uwe/Forum.aspx/access/30377
*
* Report spam or abuse by clicking the following URL:
*
http://www.accessmonster.com/Uwe/Abuse.aspx?aid=10c604df86e44260af096d6abdba216d
*****************************************