A me questo codice funziona benissimo von VB6-sp6.
codice:
Private Sub DataReport_Initialize()
Me.Sections(1).Controls("Label15").Caption = frmDisplay.txtCodInps.Text
Me.Sections(1).Controls("Label18").Caption = "ANNO - " & frmDisplay.txtAnno.Text
Me.Sections(1).Controls("Label6").Caption = frmDisplay.txtMatric.Text & " - " & frmDisplay.txtNominativo.Text
Me.Sections(1).Controls("Label13").Caption = frmDisplay.txtLuogo.Text & " - " & frmDisplay.txtNascita.Text
Me.Sections(1).Controls("Label14").Caption = frmDisplay.txtProv.Text
Me.Sections(1).Controls("Label16").Caption = frmDisplay.txtSesso.Text
Me.Sections(1).Controls("Label7").Caption = Descrizione
RptES3.Orientation = rptOrientLandscape
Set RptES3.DataSource = RsES3
End Sub
Prova a mettere il tuo codice nell'evento Initialize
codice:
' Connette il Recordset al DataReport.
rptfase_lavoro.Orientation = rptOrientLandscape
Set rptfase_lavoro.DataSource = rs
rptfase_lavoro.WindowState = vbMaximized
rptfase_lavoro.Show vbModal
Ciao e fammi sapere