If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
How to copy all report info to a new blank report
The CopyObject method mimics the manual process of selecting a db object &
doing a copy/paste. Aircode adapted from a couple of Help entries: Dim obj As AccessObject Dim dbs As Object Set dbs = Application.CurrentProject For Each obj In dbs.AllReports DoCmd.CopyObject, "Copy of " obj.Name, acReport, obj.Name Next obj This assumes you are using Access 2000(?) or higher. Fairly certain that's when CurrentProject, AllReports and AccessObject were introduced to the Access object model. "Bernie" wrote in message ... I need to copy, using code, all objects from a report into a new blank report. What about the grouping and sorting? This is a fix for reports which have a bug which causes them to crash on the NoData event. I copied some manually and that fixed the problem. |
|
Thread Tools | |
Display Modes | |
|
|