D
Dale Fye
I'm still having spell check problems.
I posted a note message to this board back in September, and never did
resolve the problem. I've worked on several other applications since then,
and have never resolved the problem I'm having with a spellcheck function
that I allow users to call via a shortcut menu. If they are in a textbox on
the main form, the function appears to run successfully, but if the control
that has the focus is on a subform, running this function causes Access
(2007) to lock up.
Public Function fnTextSpell()
Dim frm As Form
Dim ctrl As TextBox
'define the form that the popup was actually called from
Set frm = Screen.ActiveForm
While frm.ActiveControl.ControlType = 112
Set frm = frm.ActiveControl.Form
Wend
'Define the control on that form that has the focus
Set ctrl = frm.ActiveControl
'if no text is selected in the control, then select all the text
With ctrl
If ctrl.SelLength = 0 Then
ctrl.SelStart = 0
ctrl.SelLength = Len(ctrl.Text)
End If
End With
'Run the spellchecker against the selected text
' DoCmd.RunCommand acCmdSpelling
Application.RunCommand acCmdSpelling
End Function
Everything runs correctly, right up to the Runcommand acCmdSpelling, but
when the code encounters that line, I get the following warning message.
And, as you can see, I've tried both docmd.runcommand and
application.runcommand, both result in the same error and Access shutdown.
Microsoft Office Access has stopped working
Windows can try to recover your information and restart the program.
This most recent application involves a lot of long memo fields (on
subforms) , and I would really like my users to be able to use the spell
checker. Any help would be greatly appreciated.
--
HTH
Dale
email address is invalid
Please reply to newsgroup only.
I posted a note message to this board back in September, and never did
resolve the problem. I've worked on several other applications since then,
and have never resolved the problem I'm having with a spellcheck function
that I allow users to call via a shortcut menu. If they are in a textbox on
the main form, the function appears to run successfully, but if the control
that has the focus is on a subform, running this function causes Access
(2007) to lock up.
Public Function fnTextSpell()
Dim frm As Form
Dim ctrl As TextBox
'define the form that the popup was actually called from
Set frm = Screen.ActiveForm
While frm.ActiveControl.ControlType = 112
Set frm = frm.ActiveControl.Form
Wend
'Define the control on that form that has the focus
Set ctrl = frm.ActiveControl
'if no text is selected in the control, then select all the text
With ctrl
If ctrl.SelLength = 0 Then
ctrl.SelStart = 0
ctrl.SelLength = Len(ctrl.Text)
End If
End With
'Run the spellchecker against the selected text
' DoCmd.RunCommand acCmdSpelling
Application.RunCommand acCmdSpelling
End Function
Everything runs correctly, right up to the Runcommand acCmdSpelling, but
when the code encounters that line, I get the following warning message.
And, as you can see, I've tried both docmd.runcommand and
application.runcommand, both result in the same error and Access shutdown.
Microsoft Office Access has stopped working
Windows can try to recover your information and restart the program.
This most recent application involves a lot of long memo fields (on
subforms) , and I would really like my users to be able to use the spell
checker. Any help would be greatly appreciated.
--
HTH
Dale
email address is invalid
Please reply to newsgroup only.