I need to create several records at one time using both data from a text box and from a query. I created a button with the code-behind shown below and it works fine for creating numbered records. The problem I am having is passing a value from the "GetVersionItemNoOnly" adapters into the insert statement. Right now, the insert statement only uses an integer that index with each loop. It need to pull a value from the 1st column of the row corresponding to the loop. I attached a picture with some sample data to hopefully explain better.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
Dim AuditQuestionCount As New LebWebTableAdapters._6SActiveQuestionsTableAdapter
For i = 1 To AuditQuestionCount.GetVersionItemNoOnly.Count
Dim NewAuditResultLine As New LebWebTableAdapters._6SAuditResultsTblTableAdapter
NewAuditResultLine.InsertAuditResultQuery(DropDownList1.Text, i, Calendar1.SelectedDate, ListBox1.Text + ", " + ListBox2.Text + " & " + ListBox3.Text)