I have the following commands
DoCmd.Rename rptstr, acReport, rsn!OldName
...
DoCmd.SendObject acSendReport, rptstr, acFormatSNP, str, , , rsn!SbjLine
The first line works. The names of the reports change
The second line also works - sort of.
The correct report gets e-mailed to the correct recipient. However, the attached file retains the old name. (Actually, the name that the attached file has is the original name of the report from way back when and which doesn't exist any more).
Does anyone have any idea of what's happening and why. The name change involves datestamping the name of the report so I need this to work. Otherwise I could just send them off and be done with them.
DoCmd.Rename rptstr, acReport, rsn!OldName
...
DoCmd.SendObject acSendReport, rptstr, acFormatSNP, str, , , rsn!SbjLine
The first line works. The names of the reports change
The second line also works - sort of.
The correct report gets e-mailed to the correct recipient. However, the attached file retains the old name. (Actually, the name that the attached file has is the original name of the report from way back when and which doesn't exist any more).
Does anyone have any idea of what's happening and why. The name change involves datestamping the name of the report so I need this to work. Otherwise I could just send them off and be done with them.