close a specific report with VBA

fritz

New member
Local time
Today, 23:22
Joined
Dec 8, 2010
Messages
6
I have an open report on the desktop and want to close it with code. Can anyone help?
 
Try;
Code:
DoCmd.[URL="http://msdn.microsoft.com/en-us/library/aa212263%28office.11%29.aspx"]Close[/URL] acReport, "YourReportName"
 
You might also want to add acSaveNo to the third of that method so design changes aren't saved. It's not vital but worth having.
 

Users who are viewing this thread

Back
Top Bottom