Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Forms & Form designer
>Based upon no suggestions since my original question it appears that there may be no straightforward / pure "ControlSource" solution to my display question.
>
>If someone else has a similar display question, here is my solution:
>
>The Issue:
>In a grid's TextBox control I needed to display a text string based upon a field's key value, i.e. "Acme Company, Inc." from a key value "00012345". This would be simple in a ComboBox however the control must be READONLY and STYLE = 0, Dropdown Combo, apparently cannot be made READONLY.
>
>My Solution:
>I resorted to a child cursor (of the company names) with an index tag of the names' key values. Then, from the parent cursor (grid's RECORDSOURCE), I set a relation (the key value) into the child cursor.
>
>I ideally wanted to avoid a SET RELATION and, instead, handle the display issue basically within the control itself.
>
>If anyone has an "ideal" solution (like just described) I'd still appreciate hearing it. Thanks.
Ideal varies from person to person in this standards-less industry.
If you were using an n-tier design to grab your data - the answer to this would be a no-brainer. You'd alter the query populating this grid to join to the company table and grab the name. Then you set the controlsource to show the company name.
I hope that points you in a helpful direction.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only