Click here to Skip to main content
15,895,538 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Share local/network printer Pin
Eddy Vluggen5-Apr-13 7:12
professionalEddy Vluggen5-Apr-13 7:12 
AnswerRe: Share local/network printer Pin
Bernhard Hiller7-Apr-13 21:00
Bernhard Hiller7-Apr-13 21:00 
QuestionPlease help me, this program does not work. Pin
Zubair Khalid4-Apr-13 20:44
Zubair Khalid4-Apr-13 20:44 
AnswerRe: Please help me, this program does not work. Pin
Tim Carmichael5-Apr-13 3:08
Tim Carmichael5-Apr-13 3:08 
AnswerRe: Please help me, this program does not work. Pin
Eddy Vluggen5-Apr-13 7:10
professionalEddy Vluggen5-Apr-13 7:10 
JokeRe: Please help me, this program does not work. Pin
Mycroft Holmes6-Apr-13 23:31
professionalMycroft Holmes6-Apr-13 23:31 
GeneralRe: Please help me, this program does not work. Pin
Eddy Vluggen7-Apr-13 6:51
professionalEddy Vluggen7-Apr-13 6:51 
QuestionArgumentOutOfRangeException Pin
IgaBaro4-Apr-13 17:51
IgaBaro4-Apr-13 17:51 
I am getting this Error:
Quote:
Index was out of range. Must be non-negative and less than the size of the collection.

I have two winforms, and i am trying to pass data between them

Form1 has Gridview which binds to a Store procedure that selects 8 parameters from a "Guardian Table".
form2 has 8 textboxes that I want the data from Form 1 to be displayed

what I want to do is by clicking "LookUp" Button (On FORM2) to get to FORM1 and get the selected row data (when the user selects one row) and display it on form 2

Now here is my code for both forms:

SQL
Public Sub getChangesFromForm2(ByVal text1 As String, ByVal text2 As String, ByVal text3 As String, ByVal text4 As String, ByVal text5 As String, ByVal text6 As String, ByVal text7 As String, ByVal text8 As String)

    DataGridView1.SelectedRows(0).Cells(0).Value = text1
    DataGridView1.SelectedRows(0).Cells(1).Value = text2
    DataGridView1.SelectedRows(0).Cells(2).Value = text3
    DataGridView1.SelectedRows(0).Cells(3).Value = text4
    DataGridView1.SelectedRows(0).Cells(4).Value = text5
    DataGridView1.SelectedRows(0).Cells(5).Value = text6
    DataGridView1.SelectedRows(0).Cells(6).Value = text7
    DataGridView1.SelectedRows(0).Cells(7).Value = text8

End Sub


FORM 2:

VB
Private Sub LookUpBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LookUpBtn.Click

       GuardianBasicList.getChangesFromForm2(GuardianIDTxt.Text, GuardianPhoneTxt.Text, GuardianFNameTxt.Text, GuardianMNameTxt.Text, GuardianLNameTxt.Text, GuardianEmergContFNameTxt.Text, GuardianEmergContLNameTxt.Text, GuardianEmergContPhoneTxt.Text)
       GuardianBasicList.Show()
       ' Me.Close()
   End Sub


What am I doing wrong? is there another way of achieving the same result??

ANY HELP given is highly appreciated.
Thank you
AnswerRe: ArgumentOutOfRangeException Pin
David C# Hobbyist.5-Apr-13 5:55
professionalDavid C# Hobbyist.5-Apr-13 5:55 
Questionsearch a excel document Pin
staticstate2-Apr-13 7:00
staticstate2-Apr-13 7:00 
AnswerRe: search a excel document Pin
Kenneth Haugland2-Apr-13 9:13
mvaKenneth Haugland2-Apr-13 9:13 
GeneralRe: search a excel document Pin
Maciej Los10-Apr-13 3:38
mveMaciej Los10-Apr-13 3:38 
AnswerRe: search a excel document Pin
Maciej Los10-Apr-13 5:10
mveMaciej Los10-Apr-13 5:10 
QuestionSearching Data Pin
Ahmad Rifai Yusuf2-Apr-13 3:45
Ahmad Rifai Yusuf2-Apr-13 3:45 
AnswerRe: Searching Data Pin
Kenneth Haugland2-Apr-13 9:15
mvaKenneth Haugland2-Apr-13 9:15 
GeneralRe: Searching Data Pin
Ahmad Rifai Yusuf3-Apr-13 13:01
Ahmad Rifai Yusuf3-Apr-13 13:01 
QuestionHello All, need help to SET 5 days in a weeks in VB 2010 EXPRESS Pin
Yazid Aura Robbani1-Apr-13 22:08
professionalYazid Aura Robbani1-Apr-13 22:08 
AnswerRe: Hello All, need help to SET 5 days in a weeks in VB 2010 EXPRESS Pin
Bernhard Hiller1-Apr-13 22:47
Bernhard Hiller1-Apr-13 22:47 
GeneralRe: Hello All, need help to SET 5 days in a weeks in VB 2010 EXPRESS Pin
Yazid Aura Robbani2-Apr-13 8:53
professionalYazid Aura Robbani2-Apr-13 8:53 
GeneralRe: Hello All, need help to SET 5 days in a weeks in VB 2010 EXPRESS Pin
Maciej Los10-Apr-13 3:33
mveMaciej Los10-Apr-13 3:33 
GeneralRe: Hello All, need help to SET 5 days in a weeks in VB 2010 EXPRESS Pin
Yazid Aura Robbani10-Apr-13 11:16
professionalYazid Aura Robbani10-Apr-13 11:16 
Question[SOLVED] Word 2010 VBA - reading classical wordarts Pin
Bart Van Eyndhoven1-Apr-13 21:58
Bart Van Eyndhoven1-Apr-13 21:58 
AnswerRe: Word 2010 VBA - reading classical wordarts Pin
Kenneth Haugland2-Apr-13 9:19
mvaKenneth Haugland2-Apr-13 9:19 
GeneralRe: Word 2010 VBA - reading classical wordarts Pin
Bart Van Eyndhoven2-Apr-13 21:25
Bart Van Eyndhoven2-Apr-13 21:25 
GeneralRe: Word 2010 VBA - reading classical wordarts Pin
Bart Van Eyndhoven7-Apr-13 21:52
Bart Van Eyndhoven7-Apr-13 21:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.