I created an additional form to take in up to an additional 5 addresses.
My problem is with the data going into the insert command.
The code snippet is:
'Define txtCity from frmAddress Dim citytxt(5) As String citytxt(0) = frmAddress.txtCity.Text.Trim.ToUpper citytxt(1) = frmAddress.txtCity2.Text.Trim.ToUpper citytxt(2) = frmAddress.txtCity3.Text.Trim.ToUpper citytxt(3) = frmAddress.txtCity4.Text.Trim.ToUpper citytxt(4) = frmAddress.txtCity5.Text.Trim.ToUpper 'Loop thru and insert each address Dim i As Integer = 0 For Each address In line1txt If line1txt(i).Trim.Length > 5 Then 'start multiAddress loop multiAddress_insert(cust_id, line1txt(i), line2txt(i), city(i), state(i), zip(i), typetxt(i)) i += 1 Debug.WriteLine(cust_id, line1txt(i), line2txt(i), city(i), state(i), zip(i), typetxt(i)) End If Next address
But, the insert data is treating the entries like a Substring and not looping through each address?
for instance, state value = "Washington",
if there is something in the address field
it steps through and the first entry is "W"
the next is "a"