|
Question : How can I create a macro, to delete all forms and reports in a .adp project (Microsoft Access 2000)?
|
|
How can I create a macro, to delete all forms and reports in a .adp project (Microsoft Access 2000)?
|
|
Answer : How can I create a macro, to delete all forms and reports in a .adp project (Microsoft Access 2000)?
|
|
I suppose:
Sub KillEmAll() Dim strItems() As String Dim I As Long
Redim strItems(CurrentProject.AllForms.Count-1) For I=0 To CurrentProject.AllForms.Count-1 strItems(I)=CurrentProject.AllForms(I).Name Next For I=0 To UBound(I) DoCmd.DeleteObject acForm, strItems(I) Next
Redim strItems(CurrentProject.AllReports.Count-1) For I=0 To CurrentProject.AllReports.Count-1 strItems(I)=CurrentProject.AllReports(I).Name Next For I=0 To UBound(I) DoCmd.DeleteObject acReport, strItems(I) Next End Sub
|
|
|
|