Results 1 to 4 of 4

Thread: [RESOLVED] Multiple forms (yes ive searched)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2010
    Posts
    17

    Resolved [RESOLVED] Multiple forms (yes ive searched)

    ok hey all its been a while my computer was confiscated. so anyway im working with MySQL+VB but this is i assume a strictly vb question. on Form1 i log into mysql. if succesful i can bring up Form2 where i want to add a record. the problem is that my connection doesnt follow me to form2. ive attached my project. id put some code in this post but idk where the problem is.
    Attached Files Attached Files

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Multiple forms (yes ive searched)

    If you want the connection to be available in both forms, and others, then I would say that you ought to put the connection in a module, such that it is shared. If you don't want to go that route, then you can create a custom constructor on Form2 that takes a connection as an argument, or you can expose the connection via a property on Form1.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2010
    Posts
    17

    Re: Multiple forms (yes ive searched)

    i definately appreciate the quick response. In my hunt for an answer i saw the module thing so ima try tfigure it out. if you could assist me there id be gratetful.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Apr 2010
    Posts
    17

    Re: Multiple forms (yes ive searched)

    ok thanks man i found it. it works now. im sure its horible code but its functional.

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