Autodialing & email launching from Access 2000

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

Guest

How do I program email & phone # fields in Access 2000 to send from Outlook
Express & dial a phone # automatically from Access with a double-click? Is
supporting software necessary - or are these features I am just not finding?
Please copy your reply to my personal email, as well.
([email protected]). Thanks to all!
 
I am not sure about auto dialing although I have done it in the past but
don't have the MDB anymore so cant give demo code.

However, below is the code I use to send e mails on single click but thats
changed easily, just code it onto a double click event instead. the e mail
goes to the default e mail programme.

Be aware of text wrapping in the viewer window. I will try to seperate the
lines for you.

Private Sub SendEMailButton_Click()
On Error GoTo Err_SendEMailButton_Click

Dim stDocName As String
Dim StrTo As String
Dim StrSubject As String
Dim Pge As String
Dim SentQuote As Date
Dim stLinkCriteria As String

SentQuote =
Nz(Forms!frm_general_enquiries!Frm_Quotation_Subform![Quotation_Sent_Date], 0)

If SentQuote = 0 Then


stDocName = "Frm_Set_Line_Status_Date"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

Me.Date_of_Quote.Value = Date

StrTo = DLookup("[E_Mail_Address]", "[Tbl_Contact]", "[Contact]='" &
Forms![frm_general_enquiries]![ContactCombo95] & "'")

stDocName = "Rprt_Quote_By_E_Mail"

DoCmd.SendObject acReport, stDocName, To:=StrTo, Subject:="Our Quotation
Ref " & Me.Reference_No

Exit_SendEMailButton_Click:
Exit Sub

Err_SendEMailButton_Click:
If StrTo = "" Then
Me.Date_of_Quote.Value = ""
MsgBox "You have NO E MAIL ADDRESS to send to???????"
Exit Sub
End If
MsgBox Err.Description
Resume Exit_SendEMailButton_Click

End Sub

hth but the DoCmd.SendObject is the command you need to seek help on

The above code works in its current state, the address is a variable on the
current form (StrTo)(Where the send button resides), The subject is a comment
with a sequence number attached as a variable. An error trap fires if there
is no e mail address.

Let me know how you get on

Mike B
--
An Engineers Prayer:
At the very end of the day,
when all else fails,
you have tried all,
you have shouted at and blamed the innocent,
and asked everyone you know,

READ THE INSTRUCTION MANUAL.
 
David, sorry, I forgot that there is an event that triggers a sent date
record in the previous code. I have removed it on this version for clarity.
(If the sent date is not set by the user, a form popped up to prompt them to
set the date)

Be aware of text wrapping in the viewer window. I will try to seperate the
lines for you.

Private Sub SendEMailButton_Click()
On Error GoTo Err_SendEMailButton_Click

Dim stDocName As String
Dim StrTo As String
Dim StrSubject As String
Dim Pge As String

StrTo = DLookup("[E_Mail_Address]", "[Tbl_Contact]", "[Contact]='" &
Forms![frm_general_enquiries]![ContactCombo95] & "'")

stDocName = "Rprt_Quote_By_E_Mail"

DoCmd.SendObject acReport, stDocName, To:=StrTo, Subject:="Our Quotation
Ref " & Me.Reference_No

Exit_SendEMailButton_Click:
Exit Sub

Err_SendEMailButton_Click:
If StrTo = "" Then
Me.Date_of_Quote.Value = ""
MsgBox "You have NO E MAIL ADDRESS to send to???????"
Exit Sub
End If
MsgBox Err.Description
Resume Exit_SendEMailButton_Click

End Sub

hth but the DoCmd.SendObject is the command you need to seek help on

The above code works in its current state, the address is a variable on the
current form (StrTo)(Where the send button resides), The subject is a comment
with a sequence number attached as a variable. An error trap fires if there
is no e mail address.

Let me know how you get on

--
An Engineers Prayer:
At the very end of the day,
when all else fails,
you have tried all,
you have shouted at and blamed the innocent,
and asked everyone you know,

READ THE INSTRUCTION MANUAL.


MikeJohnB said:
I am not sure about auto dialing although I have done it in the past but
don't have the MDB anymore so cant give demo code.

However, below is the code I use to send e mails on single click but thats
changed easily, just code it onto a double click event instead. the e mail
goes to the default e mail programme.

Be aware of text wrapping in the viewer window. I will try to seperate the
lines for you.

Private Sub SendEMailButton_Click()
On Error GoTo Err_SendEMailButton_Click

Dim stDocName As String
Dim StrTo As String
Dim StrSubject As String
Dim Pge As String
Dim SentQuote As Date
Dim stLinkCriteria As String

SentQuote =
Nz(Forms!frm_general_enquiries!Frm_Quotation_Subform![Quotation_Sent_Date], 0)

If SentQuote = 0 Then


stDocName = "Frm_Set_Line_Status_Date"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

Me.Date_of_Quote.Value = Date

StrTo = DLookup("[E_Mail_Address]", "[Tbl_Contact]", "[Contact]='" &
Forms![frm_general_enquiries]![ContactCombo95] & "'")

stDocName = "Rprt_Quote_By_E_Mail"

DoCmd.SendObject acReport, stDocName, To:=StrTo, Subject:="Our Quotation
Ref " & Me.Reference_No

Exit_SendEMailButton_Click:
Exit Sub

Err_SendEMailButton_Click:
If StrTo = "" Then
Me.Date_of_Quote.Value = ""
MsgBox "You have NO E MAIL ADDRESS to send to???????"
Exit Sub
End If
MsgBox Err.Description
Resume Exit_SendEMailButton_Click

End Sub

hth but the DoCmd.SendObject is the command you need to seek help on

The above code works in its current state, the address is a variable on the
current form (StrTo)(Where the send button resides), The subject is a comment
with a sequence number attached as a variable. An error trap fires if there
is no e mail address.

Let me know how you get on

Mike B
--
An Engineers Prayer:
At the very end of the day,
when all else fails,
you have tried all,
you have shouted at and blamed the innocent,
and asked everyone you know,

READ THE INSTRUCTION MANUAL.


David-Midas said:
How do I program email & phone # fields in Access 2000 to send from Outlook
Express & dial a phone # automatically from Access with a double-click? Is
supporting software necessary - or are these features I am just not finding?
Please copy your reply to my personal email, as well.
([email protected]). Thanks to all!
 
David-Midas said:
How do I program email & phone # fields in Access 2000 to send from Outlook
Express & dial a phone # automatically from Access with a double-click? Is
supporting software necessary - or are these features I am just not finding?

Microsoft Access Email FAQ
http://www.granite.ab.ca/access/email.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top