RE: Email fro FORM

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks very much, trust me i love to go through the help files and it always
help me out but at this moment i really didnt have time to do that.

It worked fine thanks again for your help. One last thing if u dont mind
helping me out is when the email is ready if i cancel the email it gives a
run time error that email was canceled and ask to debug
How can I have some other error so it would not ask for debug or just
simply not to have error
Daniel wrote:
You'll need to learn to start using the help a bit more. It covers the
parameters for the sendobject method in detail.

based on the help file we can get the base synthax for this method which is

expression.SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc,
Subject, MessageText, EditMessage, TemplateFile)

1. so to add a Cc recipient you need only add a 5th variable to your coding
2. We need only concateneate the info on the form into a single string
3. Simple string manip.
4. is controled by the EditMessage boolean value

i. you should start calling you buttons by real names and not the default
values (this will simplify your life when reviewing your code at a later
date, trust me!!!).

Private Sub Command21_Click()
Dim SendTo As String
Dim SendCc As String
Dim MySubject As String
Dim MyMessage As String

SendTo = Me.[Email]
SendCc = "CcRecipientEmailAddressGoesHere"
MySubject = "Complain No :" & Me.[Complain_No]
MyMessage = "Complain No:" & Me.[Complain_No] & vbcrlf & "Customer Name:" &
Me.[Customer_name]

DoCmd.SendObject acSendNoObject, , , SendTo,SendCc , , MySubject, MyMessage,
False

End Sub
Hi All, I need assistance with the following code am using to send an email
from my form.
[quoted text clipped - 21 lines]
4- I want the email sent directly as soon the user hits send, right now it
stops for editing.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200705/1

.



Relevant Pages

  • Linking to External Help File
    ... I am working on some "Flash" based help files which run in Internet ... Dim NewMenuItem As CommandBarButton ... Dim stFullName As String ... Set Wkb = Workbooks ...
    (microsoft.public.excel)
  • RESOLVED - Re: Problem moving data from Access to Excel
    ... Function SendDataToExcel(strSource As String, strDestination As String) ... Dim objExcel As Excel.Application ... >>> variants from the Help files and they all give the same error). ...
    (microsoft.public.excel)
  • Search pattern
    ... Dim strfile As String ... Dim bAddressFound As Boolean ... Dim strCurrentChar As String ...
    (comp.databases.ms-access)
  • Auto Write Name and Merge across
    ... Dim Sheetname01 As String ... Dim WeekName01 As String ...
    (microsoft.public.excel.misc)
  • Re: multiplatform (pocketPC & desktopPC) (Daniel !!)
    ... Friend Versione As String ... Public Sub GetMyConnectionPalmare() ... Dim errorMessages As String ... Private Function GetDS_Desktop(ByVal SQL As String) As DataSet ...
    (microsoft.public.dotnet.framework.compactframework)