Spell Check Problem A2007

T

Tom Ventouris

I am running a spell check from a Ribbon using the code below. This works
when I start the DB and bypass the splash screen. When the DB is opened
normally with the splash screen the spell check will only run after running
spell check on the splash screen at least once per session.

I have removed all code and commands from the splash screen in a process of
elimination - no solution here.

Any suggestions?

************************CODE START********************

Public Function Spell()
Dim ctlSpell As Control
Dim frm As Form
Set frm = Screen.ActiveForm
DoCmd.SetWarnings False
For Each ctlSpell In frm.Controls
If TypeOf ctlSpell Is TextBox Then
If Len(ctlSpell) > 0 Then
With ctlSpell
.SetFocus
.SelStart = 0
.SelLength = Len(ctlSpell)
End With
DoCmd.RunCommand acCmdSpelling
End If
End If
Next
DoCmd.SetWarnings True
End Function

*********************CODE END******************************
 

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