M
Matt Williamson
I have a form with an option group of 4 options. I want to set the Title of
a report to the Label associated to the option that is selected. I can't
figure out how.
So far, I've got the following:
I went ahead and Dim'd everything and set the object reference so I'd get
the intellisense and hopefully be able to figure it out, but so far I
haven't
Private Sub Report_Open(Cancel As Integer)
Dim f As Form
Dim opt As Control
Dim ctl As Control
Set f = Forms("New Cash Flows")
Set opt = f.Controls("grpFilter")
me.lblTitle2.caption = opt '??? can't figure out what I need here
'this didn't work either
'With Forms("New Cash Flows").Controls("grpFilter")
' Me.lblTitle2.Caption = .Controls(.Value).Caption
'End With
End Sub
TIA
Matt
a report to the Label associated to the option that is selected. I can't
figure out how.
So far, I've got the following:
I went ahead and Dim'd everything and set the object reference so I'd get
the intellisense and hopefully be able to figure it out, but so far I
haven't
Private Sub Report_Open(Cancel As Integer)
Dim f As Form
Dim opt As Control
Dim ctl As Control
Set f = Forms("New Cash Flows")
Set opt = f.Controls("grpFilter")
me.lblTitle2.caption = opt '??? can't figure out what I need here
'this didn't work either
'With Forms("New Cash Flows").Controls("grpFilter")
' Me.lblTitle2.Caption = .Controls(.Value).Caption
'End With
End Sub
TIA
Matt