C
CJM
I need a simple bit of code to loop through all forms in a database (in
excess of 150) and change some properties within those forms.
I'm more a VB/Web developer so doing this in Access is all new to me!
I tried a basic structure as follows:
Sub Main()
Dim oForm As Form
For Each oForm In Application.Forms
Debug.Print "Formname: " & oForm.Name
Next
Set oForm = Nothing
End Sub
However when I run it within the VBA editor it does nothing; a step-through
reveals that the code doesnt even run through the For Each loop once.
I'm not even sure if running the code through the VBA editor is supposed to
work or whether it should be called a different way.
Thanks
excess of 150) and change some properties within those forms.
I'm more a VB/Web developer so doing this in Access is all new to me!
I tried a basic structure as follows:
Sub Main()
Dim oForm As Form
For Each oForm In Application.Forms
Debug.Print "Formname: " & oForm.Name
Next
Set oForm = Nothing
End Sub
However when I run it within the VBA editor it does nothing; a step-through
reveals that the code doesnt even run through the For Each loop once.
I'm not even sure if running the code through the VBA editor is supposed to
work or whether it should be called a different way.
Thanks