wsup guys.I hav managed to split a string into indivudual words usin
the split function.
i have displayed the indivudual words in three textboxes.However since am developin a swahili english language translator, how do i perform a search in my database, to look out for this indivudual wordss and there correspondin translation in swahili, and display them in a textbox? My code is as shown below.but it isnt exeuting.how do i get to search for multiple words all at once?
Private Sub cmdTranslate_Click()
Dim strEntry As String
strEntry = InputBox("Enter the english sentence to split and translate to swahili")
sFood = Split(strEntry)
Dim i As Integer
For i = 0 To UBound(sFood) 'assuming the sentence has 3 words
Text1.Text = sFood(0)
Text2.Text = sFood(1)
Text3.Text = sFood(2)
Next
With rswords
.MoveFirst
.Find "English_word like '" & Text1.Text & "'"
.Find "English_word like '" & Text2.Text & "'"
.Find "English_word like '" & Text3.Text & "'"
If .EOF = Tr Then
MsgBox "Record does not Exists"
Call ClearControls
Else
Text1.Text= ![English_word] & ""
Text4.Text= ![Swahili word] & ""
Text2.Text= ![English_word] & ""
Text5.Text= ![Swahili word] & ""
Text3.Text= ![English_word] & ""
Text6.Text= ![Swahili word] & ""
End If
End With
End Sub
regards thuku