For active:
1) Capture each character typed and query the database for possible solutions.
For passive:
1) The user leaves the text box, check against the database by splitting spaces and storing in the array.
Example of active:
Dim s As String = ""
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
'cmd = Command '
'da = Data adapter'
'ds = Data set'
'dt = Data table'
s = TextBox1.Text
Dim sqls As String = "SELECT * FROM table WHERE value='" & s & "'"
cmd = New Command(sqls,con)
da.SelectCommand = cmd
da.Fill(ds,"table1")
dt = ds.Tables("table1")
If dt.Rows.Count > 0 Then
return
Else
TextBox1.BackColor = Color.Salmon
End If
End Sub
For the passive:
Dim ar() As String
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
'cmd = Command '
'da = Data adapter'
'ds = Data set'
'dt = Data table'
ar() = TextBox1.Text.Split(" ")
For i = 0 to ar.Count - 1
Dim sqls As String = "SELECT * FROM table WHERE value='" & ar(i) & "'"
cmd = New Command(sqls,con)
da.SelectCommand = cmd
da.Fill(ds,"table1")
dt = ds.Tables("table1")
If dt.Rows.Count = 0 Then
'place your code here for letting the user know it's misspelled.'
Next
End Sub