Hi everybody,
I have a class module as follows:
Private frm As Access.Form
-------------------------------
Public Property Get aForm() As Access.Form
Set aForm = frm
End Property
-------------------------------
Public Property Let aForm(NewForm As Access.Form)
Set frm = NewForm
End Property
Now, in a form's module, if I set the frm as under,
frm is not getting its value. Can someone please tell
me how to pass the Form object to the class module's
property object ?
-------------------------------
Dim cUI As clsUI
Set cUI = New clsUI
Set cUI.aForm = Me
With cUI
.FormPosition = posTitle
.ResizeMe
End With

Signature
Sreedhar
Baz - 30 Jan 2007 15:08 GMT
When the argument is an object you need to use Property Set rather than
Property Let. You should be getting a compile error.
> Hi everybody,
>
[quoted text clipped - 26 lines]
> .ResizeMe
> End With
Sreedhar - 31 Jan 2007 02:53 GMT
Hi Baz,
> When the argument is an object you need to use Property Set rather than
> Property Let. You should be getting a compile error.
That's right. Thank you.

Signature
Sreedhar
Perry - 30 Jan 2007 20:32 GMT
What happens if you replace
> Set cUI.aForm = Me
by
Set cUI.aForm = Me.form
Krgrds,
Perry
> Hi everybody,
>
[quoted text clipped - 26 lines]
> .ResizeMe
> End With