Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box with SQL
Message
De
02/02/1999 20:19:49
Carol Adler
U.S. Army Kwajalein
Apo, Iles Marshall
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Combo Box with SQL
Divers
Thread ID:
00183232
Message ID:
00183232
Vues:
66
VFP5.0a (still waiting for our 6.0 order to arrive)

I have an employee table that contains the usual information such as name, ssn, company, etc.

When the user adds a new employee, I need a combo box that will list the existing companies with incremental search capabilities, and at the same time allow entry of a new company.

I found code in the 1996 DEVCON session by Tamar, "combo boxes, the forgotten controls". It gave me 99.9% of what I wanted, but I'm still missing something.

I use a SQL statement to populate the row source:

"Select distinct company from employee"

Row type of course, is SQL statement.

When I click on the form's Add button to add a record, I am able to type in the new company into the combobox, but it "disappears" when I do a requery(). If I type in the new company and force a tableupdate, then the requery works fine, but the Revert button has lost all meaning.

I'm sure someone has already figured this out.

Thanks in advance
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform