Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing all opened Reports

Status
Not open for further replies.

alfalf

Programmer
Joined
Mar 6, 2003
Messages
155
Location
BA
Hello.
I have this piece of code:

Code:
While Reports.count > 1
     DoCmd.Close acReport, Reports(0).Name
Wend

but I can't get Reports to close with it (which is my intention). Any help will be appreciated.

Thx.
 
alfalf,

Dont know why that is not working.

While Reports.Count > 0
MsgBox Reports(0).Name
DoCmd.Close acReport, Reports(0).Name
Wend

Will close all reports opened or not.

Mordja
 
Nope! Your code is the same. I get no response as if Reports are not opened, and they stay like that. ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top