J
Jeff Conrad
Hi,
Using Access 97 at the moment.
After building a report in code using CreateReport and CreateReportControl
coding I wish to save the report without being prompted for the name. Fine
enough I can do that by using code like this at the end:
DoCmd.Close acReport, rpt.Name, acSaveYes
But, how do I save the report with a name of my choosing without being
prompted?
Right now it saves it as Report1 or Report2, etc.
I have already assigned a caption for the report so I assumed it would save
the report with that name. I was incorrect.
If I try something like this:
DoCmd.Close acReport, "rptMyNameHere", acSaveYes
Access says it can't find that report.
Is this not possible to do?
Do I have to save the report with the default name and then rename it in
code?
Thanks,
Using Access 97 at the moment.
After building a report in code using CreateReport and CreateReportControl
coding I wish to save the report without being prompted for the name. Fine
enough I can do that by using code like this at the end:
DoCmd.Close acReport, rpt.Name, acSaveYes
But, how do I save the report with a name of my choosing without being
prompted?
Right now it saves it as Report1 or Report2, etc.
I have already assigned a caption for the report so I assumed it would save
the report with that name. I was incorrect.
If I try something like this:
DoCmd.Close acReport, "rptMyNameHere", acSaveYes
Access says it can't find that report.
Is this not possible to do?
Do I have to save the report with the default name and then rename it in
code?
Thanks,