Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with Data Environments
Message
 
To
16/01/1997 14:11:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00017515
Message ID:
00017617
Views:
68
>>>
>>>I would recommend you to have 2-column list with RowSource="table.lastname,firstname". This case Value property will reflect current record field value depending to what field your list is bound to. I would also say that Combobox or even Grid is a little bit better tahn List Bob for Table Navigation Form.
>>
>>Thanks everyone for the help
>>
>>Edward,
>>for my purpose, a 2 col list would be inappropriate. My listbox allows me to select the record I wish to work with, once selected there are 22 textboxes with their information and I just tab to each field and input their data. That is why I elected to create a class of this form, because it is used generically for my history and inbounds personnel tables. I am having difficulty in refrencing the heiarchy of these objects and data environments. I want the list box to display lastname and firstname initial, regardless of which table I'm in (personnel, history, inbounds...) I should do this in my class, but how. I don't want to rely on my v. 2.6 way of doing things. Another problem I found is when I add a new record to the table. When I append a blank my RowSource property has a fit and creates an error. I believe that if I were to tie all this to the data environment cursor this will satisfy the functionality I desire. Any and all help/suggestions will be greatly appreciated.
>>
>>TIA
>
>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
Jon Paskett

Microsoft Certified Systems Engineer
We all have to start somewhere...
Sometimes over again!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform