i have a textbox which is connected to four address fields in a database. If the user doesnt enter 4 lines of address then i understand my program will crash!! How do i work around this? heres a bit of my code that splits the textbox:
Dim mySplit As Array
mySplit = Split(txtAddress.Text, vbCrLf)
T = T & "address_1 = '" & mySplit(0) & "',"
T = T & "address_2 = '" & mySplit(1) & "',"
T = T & "address_3 = '" & mySplit(2) & "',"
T = T & "address_4 = '" & mySplit(3) & "',"
Dim mySplit As Array
mySplit = Split(txtAddress.Text, vbCrLf)
T = T & "address_1 = '" & mySplit(0) & "',"
T = T & "address_2 = '" & mySplit(1) & "',"
T = T & "address_3 = '" & mySplit(2) & "',"
T = T & "address_4 = '" & mySplit(3) & "',"