Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Items in parameterized view
Message
 
To
09/09/1998 12:04:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00134349
Message ID:
00135004
Views:
14
>>>I have a multi select listbox that I loop thru and create a string of ID's of the selected items. For example, lets say that there are three items selected in the listbox. The string would look like this:
>>>
>>>"AAAAAb,AAAAAH,AAAAAc"
>>>
>>>I store this value to a form property i.e. THISFORM.VSTRING
>>>
>>>In the View Designer, my view looks like this:
>>>
>>>SELECT Notes.no_id, Notes.co_id, Notes.recordkey, Notes.nn, Notes.sn,;
>>> Notes.name, Notes.contdate, Notes.note, Notes.phone, Notes.callback,;
>>> Status.st_status, Notes.st_id;
>>> FROM planetrk!notes INNER JOIN planetrk!status ;
>>> ON Notes.st_id = Status.st_id;
>>> WHERE Notes.st_id IN (?THISFORM.VSTRING);
>>> ORDER BY Notes.co_id, Notes.name, Notes.contdate DESC
>>>
>>>I'm doing something wrong, 'cause I'm not getting the 3 ID's that I
>>>want.
>>>
>>>What am I doin' wrong?
>>>
>>>Best
>>>Dave
>>
>>Each Id needs to quated like
>>
>>"'AAAAAb','AAAAAH','AAAAAc'"
>>
>>Try it and let me know if it works.
>
>
>Thanks for the reply Jayesh, but that doesn't seem to work either...
>
>here is the code that creates the vstring...
>
>
>thisform.vstring=""
>FOR x=1 to thisform.clist2.listcount
> IF thisform.clist2.selected(x)
> thisform.vstring=thisform.vstring+chr(39)+thisform.clist2.listitem(x,2)+chr(39)+","
> ENDIF
>ENDFOR
>thisform.vstring=left(thisform.vstring,len(thisform.vstring)-1) && strip last comma
>
>Of course then I do a requery on the view. Even entering your sugggestion directly while in the RUN QUERY of the view designer doesn't work.
>
>I'm baffled... but thanks for tryin'!

Hello Dave,

I also made an attempt to solve it but could not suceed. Let me now if find any work around.

Bye
Jayesh
- Jayesh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform