Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. dataset sharing between forms

dataset sharing between forms

Scheduled Pinned Locked Moved Visual Basic
help
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rayfouc
    wrote on last edited by
    #1

    I'm trying to use a dataset created in one form in another but: Public Shared DataSetleadsONm1 As DataSet Dim dsr1 As DataRow Private Sub frmjobs2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For Each dsr1 In DataSetleadsONm1.Tables("PRODLEADS").Rows dosn't work any help would be apreciated ray foucher

    R J 2 Replies Last reply
    0
    • R rayfouc

      I'm trying to use a dataset created in one form in another but: Public Shared DataSetleadsONm1 As DataSet Dim dsr1 As DataRow Private Sub frmjobs2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For Each dsr1 In DataSetleadsONm1.Tables("PRODLEADS").Rows dosn't work any help would be apreciated ray foucher

      R Offline
      R Offline
      Raistlin21_45
      wrote on last edited by
      #2

      You need to create an instance of the forms on each form before they can communicate ex: on form2 Public OldFrm As Form1 on form1 Dim NewFrm As New Form2 Form2.OldFrm = Me You need to do the second form first else it wont be recognized Then you can call objets like this on form1 NewFrm.MyDataset.MyTable("").Rows Hope this helps For every action there is an oposite and equal malfunction.

      1 Reply Last reply
      0
      • R rayfouc

        I'm trying to use a dataset created in one form in another but: Public Shared DataSetleadsONm1 As DataSet Dim dsr1 As DataRow Private Sub frmjobs2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For Each dsr1 In DataSetleadsONm1.Tables("PRODLEADS").Rows dosn't work any help would be apreciated ray foucher

        J Offline
        J Offline
        j45mw
        wrote on last edited by
        #3

        I believe that if you create the dataset in a module then you should be able to access it from any form you create in your project.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups