New to VB.Net + VS 2005 - creating form based on parameterised query?  
Author Message
trej





PostPosted: Visual Basic IDE, New to VB.Net + VS 2005 - creating form based on parameterised query? Top

Hi,

Im completely new to Vis Studio 2005 and VB.Net. Im mainly an access/vb programmer. Heres my problem:

I have a form with a listbox displaying records from a table in my database. When the user double clicks a row in the listbox I need to open a form to view and amend those details. I cant work out how to do this.

I have created the second form and added all the fields, im thinking I need to somehow create a parameterised query on form2 and when the row is clicked in the listbox on form1 it will pass the parameter through to form1 and then display the required fields based on that parameter.

This is v frustrating as it would take me mins in access but I dont know where to start in Vis Studio, help!!

PS Please bear in mind I am very new to this and have only just worked out how to bind a form to a datasource! Im due to go on a course in a few weeks but I need to solve this asap. thanks in advance



Visual Basic18  
 
 
DMan1





PostPosted: Visual Basic IDE, New to VB.Net + VS 2005 - creating form based on parameterised query? Top

What you are wanting to accomplish is absolutley possible....you can bind your fields on forms to to a binding source that accepts a stored procedure with parameters that are passed to the contructor of the form...

FOr more information see the data samples here:

http://msdn.microsoft.com/vbasic/downloads/code/101samples/#data