Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box hell......
Message
From
13/11/2001 04:59:48
 
 
To
13/11/2001 04:28:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00580772
Message ID:
00580774
Views:
17
Few things for you...

You don't say which version of VFP you are using.
To be honest combo's aren't really that wierd.. but a few things to remember about them
Always requery if you modify the recordsource (even if you add a record)
Once you set up the controlsource stick with the same datatype

You could try setting the rowsourcetype to fields, then fill the rowsource mytable.myfield1, myfield2 (note only specify the alias once)

One invaluable resource for little things like this is the book 1001 things you wanted to know about VFP by hentzenwerke.. it's packed full of little tidbits which will help you.

HTH

Will

>This should be simple, but obviously isn't...
>
>I have a combo box on a form that has two columns showing the contents of a foreign table. The first column is the description, the second is the code, which is numeric. The BoundColumn property is set to 2 and the BoundTo
property is set to True to get it bind. The ControlSource is a private memory variable. The row source is an Alias.
>
>Fine so far. It accepts the selection that I make. However, it won't show the description (column 1) until I save the changes. 'Ah ha' I hear you cry, you must set DisplayValue to 1 to force that column to be shown....'Ah ha ughhhh' I reply...done it..and seen some of the weirdest behaviour in a language I've seen since I used DataEase years ago. Display value works...once! and then it doesn't. If I modify the form in any way it sets the DisplayValue to 0 and I'm back to square one.
>
>I understand from my colleague, who has been using FoxPro for some years, that combo boxes are a bit weird when bound. How the hell else do you use them??? He's just showed me his usual way of using cb's and it's stoneage...
>
>Please tell me there is a simple work around...my sanity and productivity depends on it.
>
>Thanks in advance..
>
>Pablo
Will Jones
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform