-
Variable not defined
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.
-
Re: Variable not defined
Welcome to the VBF :wave:
I can help you if you give me some additional info.
Search for the CReport declaration (through the whole project) and tell us how it is defined.
-
2 Attachment(s)
Re: Variable not defined
Thanks for your help. I search the word "Creport" and find it in forms of
1) frm_employee 2) frm_users and 3) frm_subprint (the new one I copied Creport part from frm_employee).
I also attach the screen file to you. I know that Creport is about Crystal report but I don't know how to add it.
thanks.
-
Re: Variable not defined