miggitty Posted July 3, 2004 Posted July 3, 2004 I am a VB .NET novice, so here is an easy one, I hope? I have a dataset which hold 2 tables - 1. Client details 2. ZipCode I have a form (Form1)where I can edit a clients details. on that screen I have a combo box ( which contains info from Zipcode table in the dataset) where the user can choose the city. When the city is chosen the ZipCode is automatically entered from my dataset. If the ZipCode is not in the dataset I want the user to be able to add it via Form2 which will open by clicking a button on Form1. Can anyone tell me how I can read and update the dataset in Form1 from Form2? Thankyou. Quote
wessamzeidan Posted July 3, 2004 Posted July 3, 2004 You can pass the dataset to Form2 throught its constructor if Form2: Dim ds As DataSet Public Sub New(ByVal d as DataSet) ds=d End Sub in Form1: Dim f As New Form2(mydataset) f.ShowDialog() Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.