A
ant1983
First some background. Ive created a Training Booking Database that the end
user will use to book clients on various training courses.
The main output (report) for the db is a report called
rptTrainingConfirmation which is basically just that. It runs off a query
and the Unique ID in that query is autTrainingSessionID. The criteria in
that field is "[Forms]![tblBooking subform1]![numTrainingSessionID]" as the
end user click the cmdEmailInvite button that opens the report, drags the
info in the report and then attached it to an email.
Now the questions:
1 - How can i make it so that it defaults to PDF? Heres the code:
Private Sub cmdEmailInvite_Click()
On Error GoTo Err_cmdEMailInvite_Click
Dim stDocName As String
stDocName = "Training Confirmation"
DoCmd.SendObject acReport, stDocName, , "", "", "", "Training
Confirmation" & numCourse, "Dear Delegate Blah Blah Blah"
Exit_cmdEMailInvite_Click:
Exit Sub
Err_cmdEMailInvite_Click:
MsgBox Err.Description
Resume Exit_cmdEMailInvite_Click
End Sub
2 - So the Subject Line reads "Training Confirmation:" - how do i get it to
say: "Training Confirmation: <<CourseName>> <<CourseStartDate>> to
<<CourseEndDate>>
3 - How do i get the "To" in the email address populated with the email
addy? (The email addy is a field in my db)
4 - Lastly... (And this is prob the most difficult)... Some courses have
Pre-Reading which is a pdf document the delegates would need to read before
they attend the training. Now when i designed the tables i noticed i could
add an attachment field to each course so i did that and then attached the
actual pdf doc to each course. How can i get access to also attach the pdf
to the email?
user will use to book clients on various training courses.
The main output (report) for the db is a report called
rptTrainingConfirmation which is basically just that. It runs off a query
and the Unique ID in that query is autTrainingSessionID. The criteria in
that field is "[Forms]![tblBooking subform1]![numTrainingSessionID]" as the
end user click the cmdEmailInvite button that opens the report, drags the
info in the report and then attached it to an email.
Now the questions:
1 - How can i make it so that it defaults to PDF? Heres the code:
Private Sub cmdEmailInvite_Click()
On Error GoTo Err_cmdEMailInvite_Click
Dim stDocName As String
stDocName = "Training Confirmation"
DoCmd.SendObject acReport, stDocName, , "", "", "", "Training
Confirmation" & numCourse, "Dear Delegate Blah Blah Blah"
Exit_cmdEMailInvite_Click:
Exit Sub
Err_cmdEMailInvite_Click:
MsgBox Err.Description
Resume Exit_cmdEMailInvite_Click
End Sub
2 - So the Subject Line reads "Training Confirmation:" - how do i get it to
say: "Training Confirmation: <<CourseName>> <<CourseStartDate>> to
<<CourseEndDate>>
3 - How do i get the "To" in the email address populated with the email
addy? (The email addy is a field in my db)
4 - Lastly... (And this is prob the most difficult)... Some courses have
Pre-Reading which is a pdf document the delegates would need to read before
they attend the training. Now when i designed the tables i noticed i could
add an attachment field to each course so i did that and then attached the
actual pdf doc to each course. How can i get access to also attach the pdf
to the email?