Results 1 to 3 of 3

Thread: [RESOLVED] Trouble understanding this Scope problem

  1. #1

    Thread Starter
    Junior Member Snizbatch's Avatar
    Join Date
    Sep 2002
    Location
    Jacksonville, FL
    Posts
    26

    Resolved [RESOLVED] Trouble understanding this Scope problem

    I'm using Visual Studio .NET 2003 to write a SmartDevice Application.

    Here's my problem:

    I have two forms (Form1 and Form2); Form1 is the main application where all of my data is displayed and Form2 is a Data editor. When I'm finished editing the data with Form2, I want Form2 to update the ComboBoxes in Form1 with the newly added Data. But from Form2 code Form1.ComboBox1.Text cannot be accessed.

    I tried calling a Friend Sub ChangeComboBox() placed in a Public Module to access the other form, but that doesn't include Form1 in it's scope either!!!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Trouble understanding this Scope problem

    Read the first link in my signature.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Junior Member Snizbatch's Avatar
    Join Date
    Sep 2002
    Location
    Jacksonville, FL
    Posts
    26

    Re: Trouble understanding this Scope problem

    Thanks, this is good stuff! I'm reading Sams Teach yourself Visual Basic .NET in 21 Days to get myself from VB6 to VB.NET but the section on scope is far from sufficient for me. I appreciate the link!

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