Error 2046 Spell Check Unavailable

I am trying to have a spell check run through some forms.  It works on the main form but a subform that I've developed runs into error 2046 whenever I try to run a spell check.  Help would be greatly appreciated.

Sub SpellCheckCaller(FocusBox As Control)
DoCmd.SetWarnings False
If Len(FocusBox & "") > 0 Then
    With FocusBox
    .SetFocus
    .SelStart = 0
    FocusBox.SelLength = Len(FocusBox.Text)
    DoCmd.RunCommand acCmdSpelling
    End With
Else

Open in new window

LVL 1
mattfmillerAsked:
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.

Jeffrey CoachmanMIS LiasonCommented:
How are you running that code?
Where this code located?
Where is the rest of the code?
How are you "running  through" the forms (looping?)

AFAICT, You need a syntax like this to get to a subform control...:

    Forms!YourMainFormName!YourSubFormName!YourSubFormControlName

I think I may be misunderstanding something , so lets see if another expert can help further?

JeffCoachman
0
mattfmillerAuthor Commented:
The code is running once people exit text fields.
The code is located in the subform.

Here is where the code is executed.
Private Sub Text48_Exit(Cancel As Integer)
If SpellCheckerValue = "Yes" Then If Len(Text48) > 1 Then Call SpellCheckCaller(Text48)

If Len(Text48.Value) > 0 Then
Just_Scp_leave = Text48.Value
Else
Just_Scp_leave = ""
End If
End Sub

Open in new window

0
Jeffrey CoachmanMIS LiasonCommented:
Still confused...  Can you just post a sample of this database?

1. Back up your database(s).
2. If the database is split, combine the front and back ends into one database file.
3. Remove any startup options, unless they are relevant to the issue.
4. Remove any extraneous records unless they are relevant to the issue.
5. Delete any objects that do not relate directly to the issue.
6. Remove any references to any "linked" files (files outside of the database, Images, OLE Files, ...etc)
7. Remove any references to any third party Active-x Controls (unless they are relevant to the issue)
8. Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
9. Unhide any hidden database objects
10. Compile the code. (From the VBA code window, click: Debug-->Compile)
11. Run the Compact/Repair utility.
12. Remove any Passwords, Security and/or login prompts.
13. If a form is involved in the issue, set the Modal and Popup properties to: No
    (Again, unless these properties are associated with the issue)
14. Post the explicit steps to replicate the issue.
15. Test the database before posting.

In other words, ...post a database that we can easily open and immediately see and/or troubleshoot the issue., so please post the explicit instructions for it's use...

And if applicable, also include a clear, graphical representation of the *Exact* results you are expecting, based on the sample data.
0
mattfmillerAuthor Commented:
I gave up on this and rebuilt the form.  It eventually worked but I don't know why or how I did it.
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
mattfmillerAuthor Commented:
I gave up and none of the solutions provided worked.
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.