D
D. McDonough
I have created a report. I want to show a value in a text
box on this report ... this value is calculated/specified
by me in the Activate event procedure for the report.
When I try to set the value of the text box, I get the
following error (Run-tim error '2185'):
You can't reference a property or method for a control
unless the control has the focus.
How can I do what I want to do?? (My sample code is below.)
Thanks!
Here's an example:
Private Sub Report_Activate()
Dim myCtrl As Control
Dim extraValue as Long
extraValue = 171717
For Each myCtrl In Me.Controls
If myCtrl.Properties("Name") = "ExtraValue" Then
myCtrl.Properties("Text") = extraValue 'errors
End If
Next
End Sub
box on this report ... this value is calculated/specified
by me in the Activate event procedure for the report.
When I try to set the value of the text box, I get the
following error (Run-tim error '2185'):
You can't reference a property or method for a control
unless the control has the focus.
How can I do what I want to do?? (My sample code is below.)
Thanks!
Here's an example:
Private Sub Report_Activate()
Dim myCtrl As Control
Dim extraValue as Long
extraValue = 171717
For Each myCtrl In Me.Controls
If myCtrl.Properties("Name") = "ExtraValue" Then
myCtrl.Properties("Text") = extraValue 'errors
End If
Next
End Sub