Hi,
I am new at this so please bear with me. I am working on an already created DB in Access that was not completely set up. The company wanted a button on a form to be clicked where it would take the information from the proposal and send the proposals to the customer when clicked.
Currently the code in VB reads as this:
Private Sub cmdSendEmail_Click()
Dim sEmail As String
If Not IsNull(Me!Email) Then sEmail = Me!Email
OpenEmailProgram sEmail, "Job Proposal", "Please see attached job proposal.", "", ""
End Sub
---------------------
When the button is clicked, Outlook opens and sets up the email with the correct customer email (I'm assuming it is pulling the email from a form), along with the words in the subject, "Please see attached job proposal." However, there is no attached proposal.
I've looked around and found something that seemed to work, except that it won't pull the email address from the form. Here's the other code I used that attached the form, but didn't put in the email:
DoCmd.SendObject _
acSendReport, _
"rptProposal", _
acFormatRTF, _
False
--------------------------
I placed this code into the other code as follows:
Private Sub cmdSendEmail_Click()
Dim sEmail As String
DoCmd.SendObject _
acSendReport, _
"rptProposal", _
acFormatRTF, _
False
If Not IsNull(Me!Email) Then sEmail = Me!Email
OpenEmailProgram sEmail, "Job Proposal", "Please see attached job proposal.", "", ""
End Sub
----------------
Like I mentioned, it worked, except that it didn't input the email address. And I am also getting an error code and it wants me to degub. I don't know VB, but with my HTML, JS & CSS knowledge, I was able to figure out some of it to get me this far.
Any ideas how we can do this? The programmer who originally set this up is no longer doing Access programming. ACK! Any help (in language I can understand) would be great! I saw the thread: thread702-396121 and it didn't really help me out too much except that nat1967 looked really helpful, so if you want to help me out nat, I'd be really greatful!!
Thanks!!
I am new at this so please bear with me. I am working on an already created DB in Access that was not completely set up. The company wanted a button on a form to be clicked where it would take the information from the proposal and send the proposals to the customer when clicked.
Currently the code in VB reads as this:
Private Sub cmdSendEmail_Click()
Dim sEmail As String
If Not IsNull(Me!Email) Then sEmail = Me!Email
OpenEmailProgram sEmail, "Job Proposal", "Please see attached job proposal.", "", ""
End Sub
---------------------
When the button is clicked, Outlook opens and sets up the email with the correct customer email (I'm assuming it is pulling the email from a form), along with the words in the subject, "Please see attached job proposal." However, there is no attached proposal.
I've looked around and found something that seemed to work, except that it won't pull the email address from the form. Here's the other code I used that attached the form, but didn't put in the email:
DoCmd.SendObject _
acSendReport, _
"rptProposal", _
acFormatRTF, _
False
--------------------------
I placed this code into the other code as follows:
Private Sub cmdSendEmail_Click()
Dim sEmail As String
DoCmd.SendObject _
acSendReport, _
"rptProposal", _
acFormatRTF, _
False
If Not IsNull(Me!Email) Then sEmail = Me!Email
OpenEmailProgram sEmail, "Job Proposal", "Please see attached job proposal.", "", ""
End Sub
----------------
Like I mentioned, it worked, except that it didn't input the email address. And I am also getting an error code and it wants me to degub. I don't know VB, but with my HTML, JS & CSS knowledge, I was able to figure out some of it to get me this far.
Any ideas how we can do this? The programmer who originally set this up is no longer doing Access programming. ACK! Any help (in language I can understand) would be great! I saw the thread: thread702-396121 and it didn't really help me out too much except that nat1967 looked really helpful, so if you want to help me out nat, I'd be really greatful!!
Thanks!!