Hi Guyz!
Need some help to maximize search filter of my program. Im new in foxpro. Just reading codes and hows it working.
i have the following
employee.dbf
form1
grid1
cboField
txtsearchText
in form1, grid1 combo textbox are there.
combo is for the fields of form1 (example: name, company, address) where to search from
textbox1 is the text to find.
i want to extract all records having the value of textbox whether its in the beg middle or end.
this my existing code which only find records base on the beginning word
LOCAL cField, ctext, nItem
** get the selected field item#
nItem = thisform.cboField.ListIndex
IF EMPTY(thisform.aflds[nItem,2]) then
cfield = thisform.aflds[nItem,1]
ELSE
cfield = thisform.aflds[nItem,2]
ENDIF
** get value to search for
ctext = thisform.txtsearchText.Value
** call the filter routine (method)
thisform.setfilter(cField, cText)
Need some help to maximize search filter of my program. Im new in foxpro. Just reading codes and hows it working.
i have the following
employee.dbf
form1
grid1
cboField
txtsearchText
in form1, grid1 combo textbox are there.
combo is for the fields of form1 (example: name, company, address) where to search from
textbox1 is the text to find.
i want to extract all records having the value of textbox whether its in the beg middle or end.
this my existing code which only find records base on the beginning word
LOCAL cField, ctext, nItem
** get the selected field item#
nItem = thisform.cboField.ListIndex
IF EMPTY(thisform.aflds[nItem,2]) then
cfield = thisform.aflds[nItem,1]
ELSE
cfield = thisform.aflds[nItem,2]
ENDIF
** get value to search for
ctext = thisform.txtsearchText.Value
** call the filter routine (method)
thisform.setfilter(cField, cText)