Create command button to spell check form

  • Thread starter Thread starter Pamela
  • Start date Start date
P

Pamela

I don't see an option in the command button wizard for this...is there any
way to create this with code?? Thanks! Pamela
 
Pamela said:
I don't see an option in the command button wizard for this...is there any
way to create this with code?


Use this line in the command button's Click event procedure.

DoCmd.RunCommand acCmdSpelling

BUT, if you want to spellcheck a specific text box's value.
you need to select the text first:

With Me.thetextbox
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
DoCmd.RunCommand acCmdSpelling
 
That worked very well, but is there any way to limit the spell check to just
the current record??
Thanks!
~Pamela
 
If you want to spellcheck a single text box on the current
record, use the code I posted earlier.

If you want to check all the controls in the current record,
I think(?) you can use:

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdSpelling
 
Back
Top