passing a variable from one form to anothers dataset

H

hcs

Hello,

i have a form which has a datagrid and another which displays some
information. what i would like is to be able to double click a row on the
datagrid on form B and then display the select record on form A. i am using
ado.net to an access database and using oledbdataAdapter,oldbconnection and
datasets. so what i need to do is to change the dataset on Form A to only
show the record with an ID that has been selected on Form B.

Today is the second day that i have been getting into VB.net, i have used
vb6 for a long time now. i am presently trying to convert a few simple
application into vb.net so i can get used to it. in some areas it is very
similarly but in others it is miles apart and looking through google doesn't
seem to be answering my questions!

Thanks for all the help everyone has gave me so far!
 
W

W.G. Ryan eMVP

You can make the DataSet a Shared property or store it in a module - this
will let you access it throughout the entire project. Now, you have a few
methods to show just one record - but you can use DataTable.Select or use
a DataView for isntance, and set the Rowfilter property to match only the
row of that selected row in the grid.
 
H

hcs

Thanks that solved it! just shared the dataset. could you explain the
datatable.select please? i don't get how you use that

thanks for all your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top