J
John Bruen
I received the message on this line below: Set frm = Forms
(passform)
Run-time error '2450'
Microsoft Access can't find the form 'Frm1' referred to in
a macro expression or Visual Basic Code.
Function ShowProps
Dim objAcObj As AccessObject
Dim objCurProj As CurrentProject
Dim objCurData As CurrentData
Set objCurProj = Application.CurrentProject
Set objCurData = Application.CurrentData
For Each objAcObj In objCurProj.AllForms
ListControlProps (objAcObj.Name)
Next objAcObj
End Function
Function ListControlProps(passform)
Dim ctl As Control
Dim prp As Property
Dim frm As Form
Set frm = Forms(passform) <========== line in error
For Each ctl In frm.Controls
Debug.Print ctl.Properties("Name")
For Each prp In ctl.Properties
Debug.Print vbTab & prp.Name & " = " & prp.Value
Next prp
Next ctl
End Function
(passform)
Run-time error '2450'
Microsoft Access can't find the form 'Frm1' referred to in
a macro expression or Visual Basic Code.
Function ShowProps
Dim objAcObj As AccessObject
Dim objCurProj As CurrentProject
Dim objCurData As CurrentData
Set objCurProj = Application.CurrentProject
Set objCurData = Application.CurrentData
For Each objAcObj In objCurProj.AllForms
ListControlProps (objAcObj.Name)
Next objAcObj
End Function
Function ListControlProps(passform)
Dim ctl As Control
Dim prp As Property
Dim frm As Form
Set frm = Forms(passform) <========== line in error
For Each ctl In frm.Controls
Debug.Print ctl.Properties("Name")
For Each prp In ctl.Properties
Debug.Print vbTab & prp.Name & " = " & prp.Value
Next prp
Next ctl
End Function