J John thomas Registered User. Local time Today, 09:17 Joined Sep 4, 2012 Messages 206 May 31, 2015 #1 Hi is there a way to use vba to close the currently open report on the screen without specifying its name Thank you
Hi is there a way to use vba to close the currently open report on the screen without specifying its name Thank you
V vbaInet AWF VIP Local time Today, 17:17 Joined Jan 22, 2010 Messages 26,374 May 31, 2015 #2 If it's the only report opened then: Code: DoCmd.Close acReport, Reports(0).Name, acSaveNo If there are several reports opened but you want to close the active one then: Code: DoCmd.Close acReport, Screen.ActiveReport.Name, acSaveNo
If it's the only report opened then: Code: DoCmd.Close acReport, Reports(0).Name, acSaveNo If there are several reports opened but you want to close the active one then: Code: DoCmd.Close acReport, Screen.ActiveReport.Name, acSaveNo
J John thomas Registered User. Local time Today, 09:17 Joined Sep 4, 2012 Messages 206 May 31, 2015 #3 Hi Thats exactly what I need Thanks for your help John
V vbaInet AWF VIP Local time Today, 17:17 Joined Jan 22, 2010 Messages 26,374 May 31, 2015 #4 You're welcome.