How can I e-mail forms from a database?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am currently working on a database for the HR Manager. The database is
going to show all current employees, the medical and dental dates of
eligibility, new hire forms for new hires, etc. I am trying to create a
command button that allows me to e-mail the created form to any new hires.
The form has the basic information w-4, i-9, emergency information, etc.
Next to the topics are hyperlinks that they can click on and download the
forms. Is there any way that I can create a command button to perform this
function?
 
Use the send object command

docmd.SendObject acSendForm,"FormName",,To,,,Subject,TextMessage
 
I have tried to use this command and I keep getting an error message. The
command I have enterend is
DoCmd.SendObject acSendForm,"frmemailnewhireform",,,,,,,,
What am I doing wrong?
 
I have done it that way also where I enter in a e-mail address, and it still
gives me a sytax error.
Private Sub Command16_Click()
On Error GoTo Err_Command16_Click
DoCmd.SendObject acSendForm, "FormName", , "(e-mail address removed)",,,,,,
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmemailnewhireform"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command16_Click:
Exit Sub
Err_Command16_Click:
MsgBox Err.Description
Resume Exit_Command16_Click
End Sub
What am I doing wrong?
 
Try this
Private Sub Command16_Click()
On Error GoTo Err_Command16_Click

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmemailnewhireform"
DoCmd.OpenForm stDocName, , , stLinkCriteria ' What is the criteria, if
you dont have then remove that
DoCmd.SendObject acSendForm, stDocName, , "(e-mail address removed)"

Exit_Command16_Click:
Exit Sub
Err_Command16_Click:
MsgBox Err.Description
Resume Exit_Command16_Click
End Sub
 
This is wonderful thank you, but now when I send the e-mail everything that
is in the form does not show up in the e-mail. Is there a reason for this?
 
I knew that sometimes when you print a form with unboand fields, the data
wont show.
Mybe you can start another post asking that question specificly.
I'm happy I helped up to that point, but you better start another post bout
the new problem mybe somebody can help you with that, sorry.
 
Back
Top