Results 1 to 4 of 4

Thread: Variable not defined

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    2

    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.

  2. #2
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Variable not defined

    Welcome to the VBF

    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.
    Delete it. They just clutter threads anyway.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    2

    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.
    Attached Files Attached Files

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Variable not defined

    Project/References.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

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