I am trying to use the spell checker on an unbound control in Access
2000. I run the checker in the AfterUpdate event of the control.
After the spell checker is done, I get the following message:
The Macro or Function set to the BeforeUpdate or ValidationRule
Property for this field is preventing MS Access from saving the data
in the field.
I have no validation code or mask and no code in the Before
Update event.
This is the spell checker code:
Dim ctlSpell As Control
Dim frm As Form
Set frm = Screen.ActiveForm
DoCmd.SetWarnings False
' Enumerate Controls collection.
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
Any ideas?
Hank Reed