Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple control question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00613184
Message ID:
00613344
Vues:
10
Hi Kevin,

First, to get your listbox to display correctly:
Look at the columnCount and columnWidths field. These effect the display portion of the listbox. If table test has 2 columns (age, name) and you want name displayed, set the columnCount = 2, and the columWidths = "0, 25" (where 25 is the width of the name column. This will make the age column 0 width (hiding it).

You will also need to set the boundColumn property. This tells the listbox which columns data gets put in the controlSource field. In the above example you would set boundColumn = 2 to store the name column back to the table.

Second, how rowSourceType, rowSource, and controlSource work:
rowSourceType: What you are using to display in the list box, in your case an alias.
rowSource: The actual item that gets used, in your case table TEST.
controlSource: Where the data the user picks gets stored.
boundColumn: Which column in the listbox gets stored in controlSource.

Typically controlSource will NOT be the same table used for rowSource. You might create a table called JobTitle that holds a list of job titles. You would use this as the rowSource. Then create a table called employee with a jobTitle field. The employee.jobTitle would be the controlSource. Now when the user clicks on a job title in the list, the value they picked gets stored in the employee table.

hth


>This newbie offers thanks in advance.
>
>With a single table (TEST) open and selected, I put a list box in my form. ControlSource is set to Test.Name. RowSource is set to TEST. RowSourceType is set to Alias. I want the Name field in the Test table to show in the list box. Instead the first field is displayed.
>
>Please advise.
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform