Running Spell Check with AfterUpdate... possible?

  • Thread starter Thread starter wewpster
  • Start date Start date
W

wewpster

Hi, I am interested in running the spell check command for the currently
selected entry (not the default, every entry) in conjunction with
AfterUpdate, i.e., so after text is entered into a field, the entry is spell
checked. However, when I use the code below, I receive the following error
message: "The macro or function set to the BeforeUpdate or ValidationRule
property for this field is preventing the Database from saving the data in
the field." Any ideas?

### START CODE ###

Private Sub Summary_AfterUpdate()

With Me.Summary
.SetFocus
.SelStart = 0
.SelLength = Len(Me.Summary)
End With

DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
End Sub

### END CODE ###
 
This must pose a conflict with AfterUpdate... I'm guessing that the
spellcheck command, as an external program, cannot change the db data once
the form has updated. Just a thought.
 
Back
Top