Results 1 to 6 of 6

Thread: Vb6 with Active report - cannot call other report data field

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    42

    Angry 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

  2. #2
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    San Jose, Ca. - USA
    Posts
    302

    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"

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    42

    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.

  4. #4

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    42

    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

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    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"

  6. #6
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    San Jose, Ca. - USA
    Posts
    302

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width