Hi,
try the following:
declare a public variable strReportName
set it to desired report name:
strReportName="planning voor gegeven periode_12_van_JPDW"
close a report if it opened
then run docmd.sendobject
then clear strReportName=""
and in report's open event add:
if len(strReportName)>0 then
me.caption=strReportName
end if
hope it will work
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
"Jean-Paul De Winter" <(E-Mail Removed)> wrote in message
news:M12wl.153279$(E-Mail Removed)2...
> Hi,
> I posted this question in the formcoding and reports newsgroup of access
> and got the advice to ry to get my problems solved in this forum..
> Sorry if I got the wrong advice, but this is the problem:
>
> I send a generated report through email as a snp file
> I noticed the name of the snp file I send is the same as what is written
> in the report Caption property
> At this moment I wrote:
> planning voor gegeven periode
> So the send file is: planning voor de gegeven periode.snp
>
> This is the name for all reports I send.
>
> I would like the filename to contain more details so I changed the
> report-property into:
>
> "planning voor gegeven periode_" &
> [Formulieren]![bedrijven]![weeknummer] & "_van_" &
> [Formulieren]![Hoofdmenu]![Tekst24]
>
> I hoped to get a filename like:
>
> planning voor gegeven periode_12_van_JPDW.snp
>
> But alas I get:
> "planning voor gegeven periode_" &
> [Formulieren]![bedrijven]![weeknummer] & "_van_" &
> [Formulieren]![Hoofdmenu]![Tekst24].snp
> as a filename
>
> What to do?
>
> I tried to delet what is entered in the caption setting and adding a few
> lines of code
>
> Private Sub Report_Activate()
> Me.Caption = "Algemeen overzicht week " &
> [Forms]![bedrijven]![weeknummer]µ
> End Sub
>
> but again... problem still not solved
>
> Any idea?
> Thanks
>
> JP
>