K
Kari
Hi All!
I have a report with a subform. There is a command button on the report to
close it, but every time it is clicked Access askes if I want to save the
subform. How do I get rid of this annoying popup?
I think the problem stems from the "sub" being a subform, not a subreport (I
have similar reports with subreports that close just fine). I need it to be
a form so I can show it in datasheet view.
If I use the "x" button to close the report I am asked if I want to save the
report and the subreport. Code on the command button is:
DoCmd.Close acReport, "PO Report", acSaveNo
I have tried explicitly closing the subform (DoCmd.Close acReport,
"Reports![PO Report]![PO Order Details subform for PO Report].Form",
acSaveNo), or saving it first (DoCmd.Save acReport, "Reports![PO Report]![PO
Order Details subform for PO Report].Form" ), all from the command button.
Closing doesn't do anything, and saving generates an error ("Object not
open").
Any ideas on how to deal with this issue?
Kari
I have a report with a subform. There is a command button on the report to
close it, but every time it is clicked Access askes if I want to save the
subform. How do I get rid of this annoying popup?
I think the problem stems from the "sub" being a subform, not a subreport (I
have similar reports with subreports that close just fine). I need it to be
a form so I can show it in datasheet view.
If I use the "x" button to close the report I am asked if I want to save the
report and the subreport. Code on the command button is:
DoCmd.Close acReport, "PO Report", acSaveNo
I have tried explicitly closing the subform (DoCmd.Close acReport,
"Reports![PO Report]![PO Order Details subform for PO Report].Form",
acSaveNo), or saving it first (DoCmd.Save acReport, "Reports![PO Report]![PO
Order Details subform for PO Report].Form" ), all from the command button.
Closing doesn't do anything, and saving generates an error ("Object not
open").
Any ideas on how to deal with this issue?
Kari