Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox and TextBox as CurrentControl
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
ComboBox and TextBox as CurrentControl
Divers
Thread ID:
01210671
Message ID:
01210671
Vues:
65
Okay, here's a good ol' "combobox in a grid" question.

I have a table called "docs." This is a child table related to its parent table "person." The docs table consists of a few date fields, character fields, and mostly Integer fields that contain number pointers referencing the metadata in my metatable.

My form displays the Persons at the top and the Child records in a grid at the bottom. The grid's RecordSource is the "docs" table.

In the grid's Init method I am adding my combobox class called "cboMeta." This class is setup with an SQL Statement as as the RowSource to populate itself from the Metadata table depending on where it is used - Dept, Division, Status, etc. It has two columns, "metaID" and "Name".

I am using the Click event of the column to make this combobox the CurrentControl. In other words the CurrentControl is the default Textbox until the user wants to edit the field.

Two questions:

I want only the FIELD the user clicks to show as a ComboBox, not the entire COLUMN. How do I do that?

Secondly, and this is the biggie, how do I make the Metadata text display in my grid instead of the actual numbers that are stored in the "docs" table? Am I going to have to make the RecordSource a View or SQL Statement? And if so, what is the proper way to make the selection from the ComboBox update the docs table with the Integer value?

Thank you in advance!
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform