Results 1 to 2 of 2

Thread: Repor all records from subform

  1. #1
    VBAX Newbie
    Sep 2019

    Repor all records from subform

    Good Morning;

    I have a problem associated with a multi instance report associated with a form subform.

    It works perfectly for me, but it only shows me the first record of the subform where there are more than one register.

    I imagine is the focused register.

    The subform is in continuous mode.

    The code is:

    Private Sub FichaTecnicaParte_Click()

    Dim rptFicha As Report

    Static intCtr As Integer

    intCtr = intCtr + 1

    Set rptFicha = New Report_Ficha_Tecnica_General

    With rptFicha
    .Visible = True
    '.Caption = frmCalReb.Hwnd & ", opened " & Now() '"L1 Rebob." '
    .Filter = "[Artículo] = '" & Me!FABRICACION!Artículo & "'"
    .FilterOn = True
    .Move 0, intCtr * 500
    End With
    'Append it to our collection.
    clnClient.Add Item:=rptFicha, key:=CStr(rptFicha.Hwnd)
    Set rptFicha = Nothing

    End Sub

    Can someone help me show all the records in the report?

    Thank you.


  2. #2
    VBAX Guru
    Mar 2005
    You appear to be setting the Report filter to the Subform's "Articulo" rather than the Mainform's Articulo, which should be the Form's Master link in the Master/Child link.

    I do not set report filters I use queries to set the report's recordset, as that is what they are for.

Tags for this Thread

Posting Permissions

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