Dim where As StringBuilder
where.Initialize
For Each et As EditText In ArrayOfWhereEditTexts
If et.Text.Length > 0 Then
If where.Length > 0 Then where.Append(" AND ")
'The field is saved in the Tag property.
where.Append(et.Tag).Append("=").Append(et.Text) 'add single quotes if these are strings
End If
Next
If where.Length > 0 Then where.Insert(0, " WHERE ")