Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox - how to handle inactive id keys?
Message
From
17/03/2009 16:35:30
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01388586
Message ID:
01388831
Views:
115
>>How can I set up a combobox so that when adding new records to an input form, it will only display choices which are "active" in the choice table, but when viewing old records in the form, it will need to display the value of the choice, even if that choice is now disabled?
>>
>>The fields in the Choices table are:
>>
>>status ('A' for Active or 'I' for Inactive)
>>id
>>description
>>
>>Choices.id is the bound column, and it is bound to an 'id' field in the LineItems table.
>
>
>I just do a SQL - SELECT like
>
>select description,id from choices where status='A' or id=mycurrentrecord.id

Indeed! This is a perfect solution. For ALL these years, that idea had never occurred to me. It took about 3 lines of code to implement (done as my record pointer is moved).

I'm ashamed to say what I was previously doing to handle this.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform