Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Items in parameterized view
Message
From
09/09/1998 12:11:29
 
 
To
09/09/1998 12:07:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00134349
Message ID:
00134594
Views:
12
Hi Dave ---

Write a little PRG and put the following in there:
OPEN DATABASE databasename
CREATE SQL VIEW myviewname AS ;
   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 $ THISFORM.vstring ;     
   ORDER BY Notes.co_id, Notes.name, Notes.contdate DESC
Note it's just as Jess says for use of $

COMPILE and DO this PRG as required. The moral of the story is there are some things you don't want to leave to the View Designer :)



>>>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
>>
>>Try:
>>
>>WHERE Notes.st_id $ Thisform.Vstring instead of IN.
>
>
>
>Hi Jess,
>
>The $ isn't one of my options in the View designer.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform