Z
zwanz P via AccessMonster.com
hey guys,
i got a problem with the DoCmd.SendObject command
i got a form with the following code
My form: KASPERgelebriefjeform
Private Sub Knop37_Click()
DoCmd.OpenReport "KASPER - gelebriefjerapport", acViewPreview
End Sub
My report: KASPER - gelebriefjerapport
Private Sub Report_Activate()
Tekst0 = Forms!KASPERgelebriefjeform.Tekst0
Tekst2 = Forms!KASPERgelebriefjeform.Tekst2
Tekst4 = Forms!KASPERgelebriefjeform.Tekst4
Tekst6 = Forms!KASPERgelebriefjeform.Tekst6
Tekst8 = Forms!KASPERgelebriefjeform.Tekst8
Tekst10 = Forms!KASPERgelebriefjeform.Tekst10
Selectievakje28 = Forms!KASPERgelebriefjeform.Selectievakje28
Selectievakje30 = Forms!KASPERgelebriefjeform.Selectievakje30
Selectievakje32 = Forms!KASPERgelebriefjeform.Selectievakje32
Selectievakje34 = Forms!KASPERgelebriefjeform.Selectievakje34
Dim strMessage2 As String
strMessage2 = "Wij hebben u niet aangetroffen op uw werkplek (zie bijlage)." & vbLf & vbLf & "Voor eventuele vragen kunt contact met ons op nemen." & vbLf & _
"Vermeld svp het ticketnummer." & vbLf & vbLf & vbLf & _
"Met vriendelijke groeten," & vbLf & vbLf & _
"Afdeling Automatisering" & vbLf & vbLf & _
"tel 026 -378 6666" & vbLf & "(e-mail address removed)"
DoCmd.SendObject acSendReport, "KASPER - gelebriefjerapport", acFormatSNP, "Hier e-mail invoeren", , , "Helpdesk I&A: Afwezigheid werkplek", strMessage2
DoCmd.Close acReport, "KASPER - gelebriefjerapport"
End Sub
The first time i click the button on my form, its working but the second time i try it wont open outlook anymore. It still activates the report the second time couse when i delete the DoCmd.close on the report its opening so activation is not the problem. its just that it wont start the sendobject code after the first time. I have to restart my database and then its working again for 1 time, but when i click the second time it wont open outlook. Whats the problem? :"(
excuse me, my english is kinda poor
i got a problem with the DoCmd.SendObject command
i got a form with the following code
My form: KASPERgelebriefjeform
Private Sub Knop37_Click()
DoCmd.OpenReport "KASPER - gelebriefjerapport", acViewPreview
End Sub
My report: KASPER - gelebriefjerapport
Private Sub Report_Activate()
Tekst0 = Forms!KASPERgelebriefjeform.Tekst0
Tekst2 = Forms!KASPERgelebriefjeform.Tekst2
Tekst4 = Forms!KASPERgelebriefjeform.Tekst4
Tekst6 = Forms!KASPERgelebriefjeform.Tekst6
Tekst8 = Forms!KASPERgelebriefjeform.Tekst8
Tekst10 = Forms!KASPERgelebriefjeform.Tekst10
Selectievakje28 = Forms!KASPERgelebriefjeform.Selectievakje28
Selectievakje30 = Forms!KASPERgelebriefjeform.Selectievakje30
Selectievakje32 = Forms!KASPERgelebriefjeform.Selectievakje32
Selectievakje34 = Forms!KASPERgelebriefjeform.Selectievakje34
Dim strMessage2 As String
strMessage2 = "Wij hebben u niet aangetroffen op uw werkplek (zie bijlage)." & vbLf & vbLf & "Voor eventuele vragen kunt contact met ons op nemen." & vbLf & _
"Vermeld svp het ticketnummer." & vbLf & vbLf & vbLf & _
"Met vriendelijke groeten," & vbLf & vbLf & _
"Afdeling Automatisering" & vbLf & vbLf & _
"tel 026 -378 6666" & vbLf & "(e-mail address removed)"
DoCmd.SendObject acSendReport, "KASPER - gelebriefjerapport", acFormatSNP, "Hier e-mail invoeren", , , "Helpdesk I&A: Afwezigheid werkplek", strMessage2
DoCmd.Close acReport, "KASPER - gelebriefjerapport"
End Sub
The first time i click the button on my form, its working but the second time i try it wont open outlook anymore. It still activates the report the second time couse when i delete the DoCmd.close on the report its opening so activation is not the problem. its just that it wont start the sendobject code after the first time. I have to restart my database and then its working again for 1 time, but when i click the second time it wont open outlook. Whats the problem? :"(
excuse me, my english is kinda poor