Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbar, Combo, and a SELECT statement
Message
 
To
23/10/1997 09:23:29
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00056192
Message ID:
00056460
Views:
30
>>>A client wants a combo in a toolbar. The data in the combo must be filtered. I used a RowSourceType of 3, and created a SELECT statement. It works as long as I don't use a WHERE clause. If I do that, I get no records at all. If I use the same SELECT in a test form, the command window, or in a test program, it works fine.
>>>
>>>Steve
>>
>>Steve, could you post the code you're using? I've used WHERE clauses in combos with no problems....
>>
>>Barbara
>
>Hi Barbara,
>
>(I like the picture you chose.)
>
>I have tested the SELECT in a combo in a test form, too, and it works fine. I suspect the property of oApp...
>
>select cField1, cField2 ;
> from MyTable ;
> where lngForeignKey = _screen.oApp.iPrimaryKey ;
> into cursor MyCurs
>
>_screen.oApp.iPrimaryKey is set before this. If I set up a text box, it displays properly.
>
>I'm going to try a few more things momentarily.
>
>* cSteve

First, be sure you can programmatically read the oapp property ( show it in a Wait Window in the INIT method of the toolbar or something similar).

Next, once you're sure you can read the value, maybe you could make a class property in the toolbar and store the value there before running the SQL code.

Finally, are you sure your toolbar is created AFTER the oApp object?.

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform