Create command button to spell check form

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
 
M

Marshall Barton

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
 
P

Pamela

That worked very well, but is there any way to limit the spell check to just
the current record??
Thanks!
~Pamela
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top