Syntax
| SQL.SearchSyntax(SrchWords, FldNames())
| ||||||
---|---|---|---|---|---|---|---|
Description
| Builds a complex WHERE clause using keywords and a list of fields to be searched. The result can be included in a SELECT query.
This function is optimized for querying complex search queries; Its search power is comparable to that of well-known search engines on the Internet. For an explanation of the search capabilities, see the explanation in the general guide.
| ||||||
See Also
| other SQL.Searchxxxxxxxx functions.
| ||||||
Example
| Sub Main() Dim sZoek As String Dim Flds(0 To 4) As String Dim rsRec As ADODB.Recordset Dim sQuery As String Flds(0) = "BedrijfsNaam" Flds(1) = "Adres" Flds(2) = "Postcode" Flds(3) = "Woonplaats" Flds(4) = "Land" sZoek = InputBox$("Trefwoorden:") If Len(sZoek) = 0 Then End sQuery = "Select * From Klanten Where " & _ SQL.SearchSyntax(sZoek, Flds()) SQL.RunRecordSet sQuery, rsRec Do While Not rsRec.Eof Debug.Print rsRec(0), rsRec(1), rsRec(2), rsRec(3), rsRec(4) rsRec.MoveNext Loop Set RsRec = Nothing End Sub | ||||||