MS Access Form Spellchecker

I found a piece of code that will spell check a single text box on a form, but how do I  do a spellcheck for all textboxes on a single form.  Is there a way?  Thank you in advance.
leezacAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

2toriaCommented:
I don't know what your code is but you might use something in your form like:-

Dim c

For each c in forms("yourformnamehere").controls

--->run your code on c.value here

Next

This should loop through your form controls and perform the spellcheck as you want.  You might need to tweak.

HTH,
Matt

0
leezacAuthor Commented:
thanks Matt I will give a try and let you know.  I will post what I have also
0
leezacAuthor Commented:
Ok -
Here is my code and it works - the only issue is the pop up saying "The spelling check is complete" I have to click on "x" several times before it closes - I think it is looping through.

Private Sub Command2_Click()
  Screen.PreviousControl.SetFocus
  For Each c In Forms("Memo3columnstest").Controls

    DoCmd.RunCommand acCmdSpelling
    Next
End Sub
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

2toriaCommented:
Get rid of the msgbox popup and put it in the line after the Next statement so that it only shows when the loop has completed.

Matt
0
2toriaCommented:
Actually, try this:-

Private Sub Command2_Click()
  Screen.PreviousControl.SetFocus
 Docmd.SetWarnings false
  For Each c In Forms("Memo3columnstest").Controls

    DoCmd.RunCommand acCmdSpelling
    Next
 DoCmd.SetWarnings True
 msgbox "Check complete"
End Sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leezacAuthor Commented:
That worked. Thank you!!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.