Once again this is a little procedure I created for my own purposes when trying to review databases so I can quickly identify certain types of forms. In this specific case it is used to list all the continuous forms.
'---------------------------------------------------------------------------------------
' Procedure : ListContinuousFrms
' Author : Daniel Pineault, CARDA Consultants Inc.
' Website : http://www.cardaconsultants.com
' Purpose : Identify all the continuous form within a database
' Copyright : The following may be altered and reused as you wish so long as the
' copyright notice is left unchanged (including Author, Website and
' Copyright). It may not be sold/resold or reposted on other sites (links
' back to this site are allowed).
'
' Revision History:
' Rev Date(yyyy/mm/dd) Description
' **************************************************************************************
' 1 2016-11-23 Initial Release
'---------------------------------------------------------------------------------------
Public Sub ListContinuousFrms()
Dim frm As AccessObject
Dim iCounter As Long
Application.Echo False
For Each frm In CurrentProject.AllForms
DoCmd.OpenForm frm.Name, acDesign
If Forms(frm.Name).Form.DefaultView = 1 Then
iCounter = iCounter + 1
Debug.Print iCounter, frm.Name '0=Single Form, 1=Continuous Forms, 2=Datasheet, 3=PivotTable, 4=PivotChart, 5=Split Form
End If
DoCmd.Close acForm, frm.Name, acSaveNo 'Close and don't save any changes
Next frm
Application.Echo True
Set frm = Nothing
End Sub
As always, don’t forget to implement proper error handling.
I use this procedure, well a variation thereof, to identify which continuous form do not have an Alternate Back Color property set. I also use it to quickly apply various other properties to standardize forms looks, styles …