Vb6 with Active report - cannot call other report data field
Below is the coding:
Problem is this sentences: rptAmt2.Fields("Amt3").Value = 0
It cannot identifier rptAmt2 which another report data field.
Can anyone help me, thank you.
Dim rptAmt As New rptFinanceAmt
Dim rptAmt2 As New rptFinanceAmt2
If Fields("Amt3").Value = 0 And rptAmt2.Fields("Amt3").Value = 0 And rptAmt.Fields("Amt3").Value = 0 Then Fields("Amt3").Value = ""
ElseIf Fields("Amt3").Value = 0 And rptAmt2.txtAmt2 = Empty And rptAmt.txtAmt <> Empty Then Fields("Amt3").Value = 0
ElseIf Fields("Amt3").Value = 0 And rptAmt2.txtAmt2 <> Empty And rptAmt.txtAmt = Empty Then Fields("Amt3").Value = 0
ElseIf Fields("Amt3").Value = 0 And rptAmt2.txtAmt2 <> Empty And rptAmt.txtAmt <> Empty Thenb Fields("Amt3").Value = 0
End If
Re: Vb6 with Active report - cannot call other report data field
what the hell does this mean:
"It cannot identifier rptAmt2 which another report data field"
Re: Vb6 with Active report - cannot call other report data field
Quote:
Originally Posted by frigginjerk
what the hell does this mean:
"It cannot identifier rptAmt2 which another report data field"
means that it cannot detect rptAmt2 data field.
Vb6 with Active report - cannot call other report data field
very hard to find Active report syntax!
anyone can help me how to write the syntax for link to another form or report data field inside text?
thank you
Re: Vb6 with Active report - cannot call other report data field
Don't have AR handy but as far as I can remember each control has its name (just like in VB) so all need to do is call the same way you would in VB (each may have a different properties - Text or Caption or ...):
rptAmt.ActualControlName.Text = "SomeValue"
Re: Vb6 with Active report - cannot call other report data field
In AR Fields and TextBoxes are not the same thing. It's important to realize that unless you added an AR data control to the report the fields will not be created automatically.
in the initialize event of your report try adding the field like this:
Code:
me.Fields.Add "FieldName"
and be sure to type that same "FieldName" into the DataField property of your textbox.