>>(Assuming your table's name is myTable, primary key field name is pkField and index tag name is myPkTag)
>>
>>
select fieldA,fieldB, ..., pkField from myTable where intemtype="x" into cursor test
>>
>>InteractiveChange or Valid:
>>
>>
=seek(test.pkField, 'myTable', 'myPkTag')
>>thisform.refresh()
>
>Is there another way to do this?because i made a new form added 1 combo box and 1 field
>i populate my combo with my SQL and on valid /inint change i hav
>
>=seek(test.private,'test','prvate')
>thisform.refresh()
>
>
>the text box has a control source of the field from the table also i set bound to to true.
>even if i change the combo value..the text box doesnt change :(
>
>
>the SQL 2 populate my combo should be in the form init as well?
Ken,
I am having a hard time to understand you. Of course there are other ways to do that, in VFP as they say, there are at least three ways to do something. I provided the one which I think is the simplest and most reliable.
You should have it in interactivechange or valid, not both. I don't remember I said set bound to .t. somewhere. The sample I gave had nothing to do with binding. Textbox' controlsource is independant of combo's controlsource and it is a simple refresh once the record pointer is moved in the target table. However in your sample it looks weird:
=seek(test.private,'test','prvate')
Searching the value in itself??? It should look like:
=seek(comboCursor.private,'test','prvate')
I don't know what is SQL's cursorname is norif test refers to real table or not. Check the sample code I sent.
I don't understand, what is "SQL 2"? You populate the combo with a plain SQL in init or by setting its RowSource property in PEM sheet.
Cetin