Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box result in textbox

Status
Not open for further replies.

nijan

MIS
Jul 6, 2001
9
MY
hi..i'm new with vfp
wish to know on how to solve this:
how to display a combo box result in text box
eg, i have a table of result_code :
*which the content are -
code result
0 failed
1 success
2 kiv
how should i do if i choose any code,the result will
display in a text box?
help..
 
Presume that you combobox is named cboMyValues and the textbox is txtMyResultValues then you have more methods:

1. In the InteractiveChange method of the cbo put
thisform.txtMyResultValues=this.value
2. In the KeyPress method
do case
case nKeycode=13 (enter)
thisform.txtMyResultValues=this.value
endcase

I've asumed that your txt and cbo are on a form, else thisform has to be replaced with the reference of the object wich is containg txt and cbo object.

Have fun.
 
thanks for tip nefra
it's help, but not much
mm...i got many record and each record have a different ResultValues
i'd tried your tip, but once i selected the ResultValues from cbo, all records has the same ResultValues displayed in txt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top