in my form my spelling check is not working

G

GGill

I do have command button 'Spelling Check' it will call function in my form.
My spelling check works fine when i do run in my small form without any
subforms.
But if i do have tab controls in my form, 'Spelling Check' button does
nothing.
Here is code,
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
If ctlSpell.Name <> "cfs_ID" And ctlSpell.Name <> "Cl_ID" And
ctlSpell.Name <> "FlNum" Then
With ctlSpell
.SetFocus
.SelStart = 0
.SelLength = Len(ctlSpell)
End With
DoCmd.RunCommand acCmdSpelling
End If
End If
End If
Next
DoCmd.SetWarnings True
MsgBox "The spelling check is complete."

End Function
==================


Please tell me why 'Spelling Check' button is not working in my form with
tab controls or subforms???

Thanks.
 

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