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.
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.