I have a field which afterupdate runs the following code...
This runs a spell check fine if there is any text in the field. However, if there is a spelling/grammar error, when it picks it up and I choose "change" to change it to the correct spelling/grammar, the following error appears:
The code for the function is already afterupdate, and I have no code in the BeforeUpdate event. I'm not sure what to do.
Thanks,
David.
Code:
Private Sub Comments_AfterUpdate()
Comments.SetFocus
If Len(Comments) > 0 Then
Comments.SelStart = 1
Comments.SelLength = Len(Comments)
DoCmd.RunCommand acCmdSpelling
End If
End Sub
This runs a spell check fine if there is any text in the field. However, if there is a spelling/grammar error, when it picks it up and I choose "change" to change it to the correct spelling/grammar, the following error appears:
The macro or function set to the BeforeUpdate or ValidationRule property for this field is preventing Access from saving the data in the field.
* If this is a macro, open the macro in the Macro window and remove the action that forces a save (for example, GoToControl)
* If the macro includes a SetValue action, set the macro to AfterUpdate property of the control instead
* If this is a function, redefine the function in the Module window
The code for the function is already afterupdate, and I have no code in the BeforeUpdate event. I'm not sure what to do.
Thanks,
David.