Jim,
I haven't tried this just yet, but if you subclass the combo and declare a method for it (say, SetRowSource()), and then wrap the SQL in this method, you should be able to write =THIS.SetRowSource() in the property sheet for the RowSource property or (for sure) from the Init() of the instance of the combo.
In some areas the behavior of the combo box has changed considerably since VFP 3.0, and your post has given me an idea for a future presentation at our VFP SIG here in Portland. There's certainly enough material for a rather lengthy article. VFP's documentation, even though it could be more helpful in places, is still vast. Unfortunately, the VFP community doesn't have any references like Charles Petzold's classic texts on Windows programming in C (and now C# and VB.NET), although the Hacker's Guides come the closest. Petzold is a thoughtful and articulate writer who is very good at pointing out the gotchas before they are gotchas. :)
John
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement