Spell Check problems in Access 2007

D

Dale Fye

I recently upgraded to Access 2007, and have been having problems with this
ever since.

I've got some code (see below) that fires as a result of a pop-up menu
selection that is available in every large textbox (read memo field) in my
application. I've been using this code for years in 2003, and have never had
a problem.

Now, when I run this code in several of the textboxes in my application, it
causes my app to lock up. Stepping through the code, it gets past the End If
line,
but then locks up. I've tested it in multiple places throughout the
application, and it appears to be occuring primarily in textboxes that are
part of subforms.

The only thing I have not done, that I can think of, is to recreate the form
from scratch. When I step through the code, it prints out the name of the
control, it also highlights the text if none is previously highlighted, and
when I print the selected Ctrl.text and Ctrl.SelText values, they are
correct.

Furthermore, when I go into task manager, the CPU usage for MS Access is 0.

Also, I've tried both Docmd.Runcommand and Application.Runcommand

I would really appreciate some help with this. Thanks, in advance.

Public Function fnTextSpell()

Dim ctrl As TextBox

Set ctrl = Screen.ActiveControl
With ctrl
If ctrl.SelLength = 0 Then
ctrl.SelStart = 0
ctrl.SelLength = Len(ctrl.Text)
End If
End With

'DoCmd.RunCommand acCmdSpelling
Application.RunCommand acCmdSpelling

End Function

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 
M

Maurice

Hi Dale,

I took your code and tried it on a couple of memo fields in the Northwind
database. Called it from regular forms and from within subforms. I got
instant spellcheck as you would like to see so I can only confirm that your
code snippet works on my machine.

Win Vista - Access 2007 (enterprise ed.)

I know not a solution to your problem but at least it confirms that the code
snippet will work. Maybe the spellchecker is having difficulties (have you
tried Word or Excel for testing)...
 
D

Dale Fye

Maurice,

Did you try embedding the form as a subform in another form?

I've done some additional testing, with about 5 of my subforms. When I open
them up as stand-alone forms, the spell checker works properly. But as soon
as I embed them as a subform in another form, the spell checker either locks
up the application, or throws a critical Access error that closes Access.

Give this a try and let me know what your results are.

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 
M

Maurice

Dale,

I did embed a form as a subform as well same result. I gave that a try as
well because that's one of the possible catches you described in your first
post.

Did you try on a 'clean' 2007 form yet?
 

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