You can use either Word or a report to email. Have you got a unique way of identifying a detention, date and time for example?
A few notes on Word
Opening a Word Document and filling it with data from an Access Form
faq702-2379
Populate a Word Doc without Merging?
faq703-760
You will find a number of post if you use advanced search in these fora with keywords 'bookmark' and 'word'. To me, Word is not a pleasant way to do this.
A few notes on reports
[tt]DoCmd.OpenReport "rptDetentions", acViewPreview,,"StudentID=" & Me.StudentID & " And DetentionDate =#" & Format(Me.DetentionDate,"yyyy/mm/dd") & "#"[/tt]
Alternatively, base your report on a query with criteria similar to the above, that is, set the criteria line for StudentID to:
[tt]=Forms!frmDetentions!StudentID[/tt]
And detention date to, say:
[tt]=Format(Me.DetentionDate,"yyyy/mm/dd")[/tt]
Use square brackets if there are spaces in the names of your fields or if you have named fields for keywords (not a good idea) such as 'date'.
With a query set up, you will can use SendObject to create your email:
[tt]DoCmd.SendObject acSendReport, "rptDetention", acFormatRTF, Me.EmailAddress, , , "Detention", "Detention attached", True[/tt]
You can also use SendObject to build an email using controls on your form.
Otherwise
Outlook is also an option.
I hope I have all that right
