Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to put SQL to populate Combo.RowSource
Message
 
 
To
21/01/2009 21:29:34
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01376135
Message ID:
01376159
Views:
12
>>>If I put it in the INIT of the Combo, that doesn't seem to work at all. In the INIT of the form, same thing. LOAD of the form. Nope. Where do I put it so when the form comes up, the combo is populated with the SQL cursor? The SQL is too long to work in the RowSource, so I need to use Alias instead.
>>
>>Load of the form should work. Init of the combo also. Something else goes into the mix, can you debug it?
>
>Doh! Rookie mistake. The cursor was empty. But, the problem is that a value that the SQL needs is not available until the form INIT runs. What is the best way to handle the SQL? Can it go into the INIT as long as it's after the point the value is assigned? Won't the Combo choke because the cursor will not be available at that point because the object INITs happen first?

You can create your SQL in form's Init and right after that assign them in the Init in the code.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform