• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 475
  • Last Modified:

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
    .SelStart = 0
    FocusBox.SelLength = Len(FocusBox.Text)
    DoCmd.RunCommand acCmdSpelling
    End With

Open in new window

  • 3
  • 2
1 Solution
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...:


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

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
Just_Scp_leave = ""
End If
End Sub

Open in new window

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.
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.
mattfmillerAuthor Commented:
I gave up and none of the solutions provided worked.
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.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now