DarkProdigy
Registered User.
- Local time
- Today, 15:40
- Joined
- Jan 9, 2006
- Messages
- 91
Ok, so I have a Report that is filtered by several combo boxes on my main Form.
What I want is to change the value of a text box on a sub report on the main Report. The sub report that this combo box is on is either visible or not visible depending on the selection in the combo box. I have this part working properly
So now I want to change the value of the text box to "0" when the sub report is not visible. I placed the following code on the On Format event in the Details section of the main report:
where "rptInvoice" is the main report, "rptCoating" is the optionally visible sub report and "txtCoatingTotal" is the text box who's value I wish to change
now when I open the report with the selection that causes the sub report (rptCoating) to be not visible, I get a "Runtime error: '2448' You can't assign a value to this object"
I'm just wondering how I can fix this. The text box total is based on a sum of a multiplication of a [Quantity] and [Unit Cost] field on the sub report. Would this have anything to do with it?
Thanks in advance for your help
Nathan
What I want is to change the value of a text box on a sub report on the main Report. The sub report that this combo box is on is either visible or not visible depending on the selection in the combo box. I have this part working properly
So now I want to change the value of the text box to "0" when the sub report is not visible. I placed the following code on the On Format event in the Details section of the main report:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Reports!rptInvoice!rptCoating.[Visible] = False Then
Reports!rptInvoice!rptCoating!txtCoatingTotal = 0
End If
End Sub
now when I open the report with the selection that causes the sub report (rptCoating) to be not visible, I get a "Runtime error: '2448' You can't assign a value to this object"
I'm just wondering how I can fix this. The text box total is based on a sum of a multiplication of a [Quantity] and [Unit Cost] field on the sub report. Would this have anything to do with it?
Thanks in advance for your help
Nathan