Private Sub btnTransForm1_Click(ByVal sender As _
System.Object, ByVal e As System.EventArgs) Handles btnTransForm1.Click
Dim Words() As String = RemoveUnwantedCharacters(txtLangIn.Text).Split(" ")
Dim Output As String
Dim n As Integer = 0
txtLangOut.Clear()
For n = 0 To Words.Length - 1
Try
'data base call code
oledbcon.Open()
strSQL = ("SELECT " & cbxLangOut.Text & " FROM English WHERE " _
& cbxLangIn.Text & " = '" & Words(n) & "'")
'Output = IsTableNull(oledbcon, "English", strSQL)
'MsgBox(Output, , " ")
cmd = New OleDb.OleDbCommand(strSQL, oledbcon)
objRead = cmd.ExecuteReader
While objRead.Read
If IsDBNull(objRead(cbxLangOut.Text)) Then
MsgBox("Error", , " ")
Else
Me.txtLangOut.Text &= objRead(cbxLangOut.Text) & " "
End If
End While
objRead.Close()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "")
Catch ex As System.Data.SqlTypes.SqlNullValueException
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "")
Finally
oledbcon.Close()
'For i As Integer = 0 To Output.Length - 1
'txtLangOut.Text &= Output(i) + " "
'Next
End Try
Next
gbIn.Text = cbxLangIn.Text
gbOut.Text = cbxLangOut.Text
End Sub