Macro for spellcheck?

  • Thread starter Thread starter Mary
  • Start date Start date
M

Mary

I have a form with 2 subforms that are used for data entry. I'd like to set
up a macro, preferrably a button on the main form, where the user can do a
spellcheck of both subforms when they're done editing. Can anyone help?

Thanks,
Mary
 
I've got this working now. Instead of subforms I decided to have the
spellcheck button open the forms up separately. I added a button on the main
form with the following code and it does what I need. Posting the code in
case anyone else needs something similar. My subforms have an ID field that
relates the main form. On one subform that field is named "ID", on the other
it is named "EventID".

Private Sub Command111_Click()
Dim strWhere As String
Dim strwhere1 As String
strWhere = "[EventID] = " & Me.ID
strwhere1 = "[ID] = " & Me.ID
DoCmd.OpenForm "Spellcheck Write-up", acNormal, WHERECONDITION:=strwhere1
DoCmd.RunCommand acCmdSpelling
DoCmd.Close

DoCmd.OpenForm "spellcheck - Timeline", acNormal, WHERECONDITION:=strWhere
DoCmd.RunCommand acCmdSpelling
DoCmd.Close
End Sub
 
Back
Top