I am using VB6 and there is one VB project. In that file, there are many forms insided, one source of them has details belowed:-

With CReport .Connect = gConn
.DataFiles(0) = cDataFile
.SelectionFormula = Trim(g_PopupKey1)
' .SQLQuery = cSql
.WindowState = crptMaximized
.Destination = crptToWindow
.ReportFileName = App.Path & "\Reports\" & "Resigned List.rpt"
.Action = 1
End With

When I copied this part to another new form and run project, it has error
"Variable not defined" at Creport. Well, then I went back to the original one and clicked on List properties/methods, I can see Creport but for the new form, I cannot see it.

Do you anyone please help to suggest how to add creport into new form??

Thanks so much.