Article ID: 139769
Article Last Modified on 8/14/1999
CREATE TABLE test (test c(10))
INSERT INTO test (test) VALUES("pigs")
INSERT INTO test (test) VALUES("sheep")
INSERT INTO test (test) VALUES("hippos")
INSERT INTO test (test) VALUES("pigs")
INSERT INTO test (test) VALUES("sheep")
INSERT INTO test (test) VALUES("hippos")
pigs,sheep,hippos
Test.Test
* This code writes the user's value to the test.test field
* if the value does not appear in the list:
if upper(this.displayvalue) != 'PIGS' and;
upper(this.displayvalue) != 'SHEEP' and;
upper(this.displayvalue) != 'HIPPOS'
replace test.test with thisform.cdspval
endif
thisform.cdspval=""
thisform.refresh
thisform.cdspval=this.displayvalue
thisform.combo1.rowsource = 'pigs,sheep,hippos'
if alltrim(upper(test.test))!="PIGS" and;
alltrim(upper(test.test))!="SHEEP" and;
alltrim(upper(test.test))!="HIPPOS"
if !empty(test.test)
thisform.combo1.additem(alltrim(test.test))
endif
endif
* This code returns the combo1.rowsource list to its original value * before another object gains the focus this.rowsource = 'pigs,sheep,hippos'
Additional query words: VFoxWin
Keywords: kbcode KB139769