Private Sub act_DblClick(Cancel As Integer)
Dim msgTxt As Variant
Dim objOutlook As Outlook.Application
Dim objMailItem As Outlook.MailItem
Dim blnCreated As Boolean
Dim act As String
Dim venue As String
Dim start As String
Dim finish As String
Dim actfee As String
Dim netpay As String
Dim actpayment As String
Dim actcomment As String
Dim gigdate As String
Dim artist_email As String
strEmail = "me@here.com.au"
strSubject = "Weekend Booking Confirmation"
strBody = "<h2><b>Please confirm your weekend bookings</b></h2>"
act = Me.artist
gigdate = Format(Me.gigdate, "dddd dd mmmm yyyy")
venue = Me.venuename
start = Format(Me.start, "hh:nn am/pm")
finish = Format(Me.finish, "hh:nn am/pm")
artist_email = Me.artist_email
blnCreated = False
Set objOutlook = New Outlook.Application
If IsNull(Me.artist_email) = True Or Me.artist_email = "" Then
DoCmd.Hourglass False
msgTxt = MsgBox("Unable to create an email for " & Me.act & Chr(13) & "No email address listed in the database.", vbOKOnly + vbInformation, "")
Else
DoCmd.Hourglass True
Set objMailItem = objOutlook.CreateItem(olMailItem)
With objMailItem
.To = Me.artist_email
.CC = strEmail
.Subject = strSubject & " - " & act & " - " & gigdate
.HTMLBody = strBody & "<p>" & "<table border=1>" & "<tr>" & "<td>" & gigdate & "</td>" & "<td>" & act & "</td>" & "<td>" & venue & "</td>" & "<td>" & street & "</td>" & "<td>" & suburb & "</td>" & "<td>" & start & " - " & finish & "</td>" & "</tr>" & "</table>"
.Save
' .Send
blnCreated = True
End With
End If
DoCmd.Hourglass False
End Sub