Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid: ControlSource - column vs CurrentControl?
Message
From
13/12/2006 11:48:17
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01177136
Message ID:
01177230
Views:
10
>>>>As for using a cursor or table as the RowSource for my combo, I am only trying to display a list of item codes and item descriptions. If I use a table (as opposed to a cursor), I can still control the order of the fields displayed in my combo's list using depending the RowSource property. e.g. RowSource=Lookup.field1, field2 vs RowSource=Lookup.field2,field1. Maybe I'm not understanding something ? - which is happening a lot as I learn VFP :)
>>>
>>>If you're using RowSourceType = 6, then you can specify fields you want in the order you want. If you're using Alias as a RowSourceType (2), then the fields will be in the exact same order as they are in the table, which is RowSource. So, it looks like RowSourceType = 6 is the answer. And that's why if we want to use RowSourceType = 2 (alias) we need to have fields in the table in the order we need. That's why we may want to use select statement to create a cursor.
>>>
>>>The question is - why do we need to go this troublesome route if RowSourceType = 6 will give us the result we want? And I'm not certain in the answer to this question <g>
>>
>>Thanks Naomi! I feel better that at least I'm asking good questions :)
>>
>>Maybe someone else can shed some light?
>
>I hope someone can join this thread to answer OUR questions <g>

Not sure if this simplifies things for you, but I did see that setting RowSourceType=3 allows you to specify RowSource = your SQL statement. That would save you putting the SQL in your form's Init. Then again, it might be more efficient to only run the SQL one time (in Init).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform