>>>>SELECT * FROM myTable WHERE myCodeField IN ?myCodeVariable and in this particular case
myCodeVariable = "'AAAA','BBBB','CCCC'"
>>>
>>>Think you need like this
>>>
>>>select * form mytable where (mycodefield in myvariable(1)).or.(mycodefield in myvariable(2)).or. etc
>>>
>>That's right, Todd, I implemented this in form of
>>SELECT * FROM myTable WHERE myCodeField IN ?aCodes(1),?aCodes(2), etc., but it has fixed number of variables, and we were thinking of different number for each REQUERY().
>>
>>Nick
>
>then use code to construct the select statement
>
>v='select * from mytable where mycodefield in '
>for x=1 to numneeded
> v=v+'?acodes('+alltrim(str(x))+'), '
>next
>v=substr(v,1,len(v)-2)
>&v
>
>should do it
>
>HTH
In our case it should be right in view definition, and the trick is that we cannot substitute ?&v instead of ?v.
But anyway, don't worry, we found at least 3 workarounds by changing code which uses that view.
Thanks,
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison