How do i send an Outlook message on the push of a button?

can i ask will anyone be able to download it cos i won't be able to if they can. : (
 
can i ask will anyone be able to download it cos i won't be able to if they can. : (
Yep! Only include the relevant bits, like the table and/or query, and the report. I don't want to see the whole db.
 
ok no probs i'll do it but can you tell me how to delete it after ... cheers ed
 
Click on the Edit button and you will see how. Anyway you shouldn't delete the post, but you can remove the db afterwards.
 
I've got it working now i think i had just left off the [templatefile] parameter now i have added it it seems to be working fine! Thank You for your time and patience!
 
ps what should i put instead of On Error Resume Next i just want to make sure that if they click to close the email window it doesn't pop up an error message! Cheers ed
 
2501 when i clcik the email window closed to cancel the sendobject command ... i have read that you can put code into the save button field but i can't see a save button property listed .... i am currently trying to work out the code below and where to put it maybe in one of my button properties (on Exit?) or in the original CLick function that starts the whole thing off!! cheers

[Case] Error_Handler_Exit:
Exit Sub

Error_Handler:
Select Case Err.Number
Case 2501
Err.Clear
Resume Error_Handler_Exit
Case Else
MsgBox "Error No. " & Err.Number & vbCrLf & "Description: " & Err.Description, vbExclamation, "Database Error"
Err.Clear
Resume Error_Handler_Exit
End Select [/Case]
 
Hi, I have used this code to handle 2501,
[Case]
On Error GoTo Err_Handler

DoCmd.SendObject acSendNoObject, , , Me![Top of Jobs].Form.Email, , , "Re:" & [Job Title], "Dear " & Me![Top of Jobs].Form.[Title] & " " & Me![Top of Jobs].Form.[Last Name] & ",", , False

Exit_Handler:
Exit Sub

Err_Handler:

Select Case Err.Number

Case 2501
' The report has been cancelled due to no data
' The report's coding shows the message,
' so no need for another one here.

Case Else
MsgBox Err.Description, vbExclamation, "Error No: " & Err.Number

End Select

Resume Exit_Handler
[/Case]

Cheers Ed
 

Users who are viewing this thread

Back
Top Bottom