QUOTE(nirmala82 @ 14 Sep, 2008 - 06:54 PM)

hi frends,its bit urgent for me,can anyone find me coding of the below mentioned requirement,thank frens in advance those who r helping me...
need to give one number in textbox click login button,the text box value shld be chekd with the database table(borrower),if borrowernumber(one of the field in borrowertable) has the same value,if so, automatically go to next for which shld display all the information of thhe borrwers in datagrid with a label text visible at runtime...thanks
in form1:
I can't believe I am replying to this, but I think I translated what you are asking... What you should do is add a public sub to your Testforissues form, and call this sub to populate the form before you show it. This allows you to easily pass the cardnumber parameter. That is a much cleaner practice then cross referencing instances of forms. Next I think you may have to change a couple lines were you assign your datasource, I don't think you are using DefaultViewManager as it is intended.
CODE
Dim issues As New Testforissues
issues.PopulateBorrower(txtcardnumber.Text.ToString)
issues.Show()
In your Testforissues form...
CODE
Public Sub PopulateBorrower(CardNumber as String)
'Place your code currently in your form_load event here and use the CardNumber parameter above to build your SQL.
cmd.CommandText = "select * from borrowers where cardnumber='" & CardNumber & "'"
'And change your datasource to this
da.Fill(ds, "borrowers")
DataGrid1.DataSource = ds
DataGrid1.DataMember = "borrowers"
End Sub
Also all those MsgBox popups are bad, only use them when an error occurs. For status/informational messages use a label control or a status bar to display the other messages. If you are doing it for debug purposes use Debug.WriteLine("Status message") and you can view the messages in you Output window within VS.
Also you should never get into the habit of building SQL statements like you are. They are open to injection. Look into paramertized queries or stored procedures if possible.