B
BAC
Vista Ultimate, Access 2007, SQL Server 2008
I have an App with over 150 forms
I have been tasked to change the recordsource for all forms that currently
have a SELECT statement in their recordsource to a view and to change the
controlsource for all controls that have a select statement to a view as well
(i.e. remove all the SELECT statements from all the forms..
To ID which forms need changing, I am trying to get a list of the forms that
have select statements and their controls:
for each frm in forms
Debug.print frm.name, frm.recordsource
next frm
does fine for open forms only
for each frm in currentdb.allforms
Debug.print frm.name
for i = 0 to frm.properties.count -1
debug.print frm.properties(i).name, frm.properties(i).value
next i
next frm
Only prints the form's name ( as if the forms have no properties!)
SO: How do I get a list of all the forms (open or not) and their
recordsource AND the control source for the controls?
Intellisense does not offer a recordsource property for the ALLForms approach.
The VBA code reference in MSDN, the microsoft's KB and a Google search have
not been particularly clear in this.
TIA
BAC
I have an App with over 150 forms
I have been tasked to change the recordsource for all forms that currently
have a SELECT statement in their recordsource to a view and to change the
controlsource for all controls that have a select statement to a view as well
(i.e. remove all the SELECT statements from all the forms..
To ID which forms need changing, I am trying to get a list of the forms that
have select statements and their controls:
for each frm in forms
Debug.print frm.name, frm.recordsource
next frm
does fine for open forms only
for each frm in currentdb.allforms
Debug.print frm.name
for i = 0 to frm.properties.count -1
debug.print frm.properties(i).name, frm.properties(i).value
next i
next frm
Only prints the form's name ( as if the forms have no properties!)
SO: How do I get a list of all the forms (open or not) and their
recordsource AND the control source for the controls?
Intellisense does not offer a recordsource property for the ALLForms approach.
The VBA code reference in MSDN, the microsoft's KB and a Google search have
not been particularly clear in this.
TIA
BAC