CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013
    Posts
    19

    Forms access null exception.

    Hi
    This is stranged.

    This first scenario works good!!!
    ============================================================
    FORM1
    F3 AS NEW FORM3
    F3.SHOWDIALOG()

    FRIEND SUB METHOD()
    F3.BACKCOLOR = AQUA <----- (WORKS FINE)
    END SUB
    ============================================================
    FORM3
    FORM1.METHOD()
    ============================================================

    This second scenario DOES NOT work !!!
    ============================================================
    FORM1
    F2 AS NEW FORM2
    F2.SHOWDIALOG()
    ============================================================
    FORM2
    F3 AS NEW FORM3
    F3.SHOWDIALOG()

    FRIEND SUB METHOD()
    F3.BACKCOLOR = AQUA <----- F3 IS NOTHING !!!! (EXCEPTION)
    END SUB
    ============================================================
    FORM3
    FORM2.METHOD()
    ============================================================

    Sorry for this poor explanation but it is 2:17 AM

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Forms access null exception.

    None of that is valid code. Please use complete code with TAGS.

    Code:
    ' code with TAGS.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured