Solved

Transfer data from one form to a grid bounded to data set on another form?

Posted on 2004-09-12
1
182 Views
Last Modified: 2010-04-23
I have two forms: TimeSheet form and Client Search form.
In Client Search form I have three list boxes: Family Name, Client Name, and ClientCode.

When I click on SELECT button on Client Search form I want to input selected data in three list boxes listed above and insert that data in TimeSheetForm data grid that is bounded to a TimeSheetDataSet dataSource that has a table with columns 'FamilyName', 'ClientName', and 'ClientCode'.  

How do I transfer data from ClientSearch form and insert values on the appropriate data grid fields in TimeSheet form.

Thank you in advance,

Zorica
0
Comment
Question by:zorica329
1 Comment
 
LVL 10

Accepted Solution

by:
123654789987 earned 125 total points
ID: 12041287
U can set a property in the ClientSearch form that can be used to access the data

In ClientSearch Form say u have a information in the form of three datatables. Insert these datatables into a dataset.

dataset1.Tables["FamilyName"]
dataset1.Tables["ClientName"]
dataset1.Tables["ClientCode"]

Then store the dataset as a property in ClientSearch form

Public Property Prop1() As Dataset
      Get
        return dataset1
     End Get
   Set(ByVal Value As String)
               dataset1= Value
      End Set
     End Property

This property can be accessed by the TimeSheet form

Dim clientFrm as ClientSearchForm
clientFrm = new ClientSearchForm

Dim dataset2 as new Dataset
dataset2 = clientFrm.Prop1

U can extract the datatables from this dataset



0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now