Macro for spellcheck?

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
 
M

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
 

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

Similar Threads


Top