>>We want to write a SQL statement in a ComboBox RowSource with a Where clause depending of an Entry Field of the same Form.
>>
>>The only way we have found is to put the EntryField.value in a Public Variable and do :
>> Select field1 from Table1 Where Table1.Field2 = PublicVariable
>>
>>It does not work when we want to do :
>> Select field1 from Table1 Where Table1.Field2 = ThisForm.EntryField1.Value
>>
>>If someone have an idea about the right syntax !!!
>>
>>Analystik team.
>
>local lcGetValue
>lcGetValue = thisform.entryfield1.value
>
>select field1 from table1 where table1.field2 = lcGetValue
>
>need to use a var because sql has problems with this.anything
Dave,
You are right, VFP does not understand "this.anything".
But, it does not work with "local lcGetValue" ... because the only thing it's possible to enter in the RowSource property is a SQL statement and not "local lcGetValue" and "lcGetValue = thisform.entryfield1.value".
Analystik team.