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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Report

Status
Not open for further replies.

Beard36

Programmer
Sep 4, 2003
69
GB
Is there any way to delete a report from vba?

I've got one report that is set up as a template. When someone requests a report with particular parameters, this template report is copied to a temporary report and populated with information, then displayed. Then I'd like this temporary report removed after the user has finished viewing it.

So is there a way to do this?
(It may be that I'm going about this problem in an unusual manner, as I've not been using Access all that long. The only reason I'm using these temporary reports is a concern that several users may request different reports at the same time, and so thought that each user would need a different report [?]).

Thanks in advance for any help anyone can give me (also if I've not been very clear, please ask for further explanation). Cheers!
 
Put the code

DoCmd.DeleteObject acReport ,"report name"

on the event where you want the report deleted. You use this to delete any access object forms, tables etc by changing the object constant

Hope that helps

;)
 
Yes! That did help a lot!

I've been Googling (and using other resources) on and off for ages today and just hadn't turned anything up - the problem with these things is knowing just what to search for, I guess.

So, again, cheers! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top