Blackwidow
Registered User.
- Local time
- Today, 02:31
- Joined
- Apr 30, 2003
- Messages
- 149
I have a form with email addresses on to forward a report to a particular person. Code is below
Private Sub cmdMail7_Click()
On Error GoTo Err_cmdMail7_Click
Dim stDocName As String
stDocName = "rptConsPrint"
DoCmd.SendObject acReport, stDocName, acFormatSNP, "stottd@Collegeh.bham.sch.uk", , , "Consequence Issued", "SIBAL MESSAGE: The Attached Consequence has been issed. Please Log into Sibal and deal with this incident.", NO
Exit_cmdMail7_Click:
Exit Sub
Err_cmdMail7_Click:
MsgBox Err.Description
Resume Exit_cmdMail7_Click
The Problem I have is that this code will work once, but say I then send another report or indeed the same report to someone (Obviously using the above code on another button with a different email address) then it doesnt work, it just does nothing....
I cant understand why it will work once but not again, the only way to get it to work again is to log out and reload, which obviously is not the answer! It isnt coming up with an error message or anything, it just does nothing...
If anyone can help I would really appreciate it as this database is going live next week and I'll have to stall if I cant fix this
Private Sub cmdMail7_Click()
On Error GoTo Err_cmdMail7_Click
Dim stDocName As String
stDocName = "rptConsPrint"
DoCmd.SendObject acReport, stDocName, acFormatSNP, "stottd@Collegeh.bham.sch.uk", , , "Consequence Issued", "SIBAL MESSAGE: The Attached Consequence has been issed. Please Log into Sibal and deal with this incident.", NO
Exit_cmdMail7_Click:
Exit Sub
Err_cmdMail7_Click:
MsgBox Err.Description
Resume Exit_cmdMail7_Click
The Problem I have is that this code will work once, but say I then send another report or indeed the same report to someone (Obviously using the above code on another button with a different email address) then it doesnt work, it just does nothing....
I cant understand why it will work once but not again, the only way to get it to work again is to log out and reload, which obviously is not the answer! It isnt coming up with an error message or anything, it just does nothing...
If anyone can help I would really appreciate it as this database is going live next week and I'll have to stall if I cant fix this