Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box with SQL
Message
From
02/02/1999 20:19:49
Carol Adler
U.S. Army Kwajalein
Apo, Marshall Islands
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Combo Box with SQL
Miscellaneous
Thread ID:
00183232
Message ID:
00183232
Views:
65
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
Next
Reply
Map
View

Click here to load this message in the networking platform