Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with Data Environments
Message
From
17/01/1997 14:14:48
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00017515
Message ID:
00017715
Views:
72
>>IMHO I don't see why 2-col list will be not OK. The problem is bounding to data. If you are going to fill list from different tables, you probably should use RowSourceType=2 (alias), create cursor (lastname,firstname) in Form.Init and refill it (requering list) each time you change table. In List.InteractiveChange event you could fire some custom RefreshData method to fill textboxes with new record data depending on table name again.
>
>Tell me more,
>
>The 2.6 way I would create my cursor, open table etc. in the setup code. I thought the data environment did away with all that. I see when you add a table to the data environment it automatically creates a cursor of that table. Are you suggestind I programatically create this cursor to display lastname, firstname initial (which would prevent my error). Second, this list is only going to be filled with data from my parent table. Of course some text boxes WILL be displaying data from other related tables. This information you are sharing is extremely valuable to me because there is no one I work with or even know that have my same interest. The UT is priceless for people in my situation. Thanks for all the advice!
>
>Jon

Creating cursor programmatically (using CREATE CURSOR) is the most reliable way to handle complicated list/comboboxes (e.g. if you have flexible row source, view order etc.) Any time you refill the cursor (running SQL-Select/Insert) and refresh the list (using Requery method) you can bring up different set of data from one or many related tables.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform