Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox - basic query
Message
De
26/07/2010 13:19:55
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Combobox - basic query
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01473935
Message ID:
01473935
Vues:
103
I fear I am missing something very obvious, but am at a loss to see it....

Suppose I have "Fruits" table with 2 fields - "group","type". I have 6 records with the following data in the 2 fields:

"Apple","Cox"
"Apple","Desire"
"Banana", "Panama"
"Cherry", "Delight"
"Banana", "Spanish"
"Cherry", "BlackJack"

I have a form with the "Fruits" table in the dataenvironment and a combobox set to style 0 - dropdown combo - with rowsourcetype set to SQL and the rowsource set to: "select distinct fruits.type from fruit into cursor mylist"
The control source for the combobox is set to Fruits.group.
This provides a combobox with the entries "Apple","Banana","Cherry" and also allows user input of another group item.

When adding a new record,as well as accepting existing entries, I want to be able to add a further "group" on-the-fly e.g. "Oranges" with a "type" entry of say "Seville".

My problem is that when I type in a new group entry it is not stored to the underlying Fruits table. The underlying table will only accept values listed in the sql cursor. The field Fruits.group remains empty, although the Fruits.type field is correctly filled.

At present I can not see how typing anything in the textbox portion of a combobox ever gets saved. I am clearly missing the point here - can someone explain what I am doing wrong? (Databuffering on the table is set to 0)

Thanks
Barry Sutton
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform