field type property in VB
Posted on 2000-02-18
I'm running a keyword search on a form that works like this ..
Dim strSearch as String
Dim fld as Field
strSearch = ""
For each fld in Me.recordsetclone.fields
If (fld.Type = dbText or fld.Type = dbmemo) Then
strSearch = strSearch & fld.Name & " Like " & Chr(34) & "*" & me.keywordsearch & "*" & Chr(34) & " OR "
If (fld.Type = dbInteger) Then
strSearch = strSearch & fld.Name & " = " & me.keywordsearch & " OR "
strSearch = Left(strSearch, Len(strSearch) - 4)
me.Filter = strSearch
me.FilterOn = True
Now, this all works, except it doesn't recognize the integer fields. If generates the strSearch for memo or text fields, but doesn't for integer fields.
Is there something I'm missing in the fld.Type property?