Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display combo with no selection
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026750
Message ID:
01026996
Views:
17
Nadya,
I didn't follow whole the thread and may be I'll say something stupid, what if:
.cboEmployees.rowsourcetype = 3
.cboEmployees.rowsource = ;
			"SELECT distinct cEmpName, cUserID " + ;
			"FROM " + m.tcEmployeeAlias + ;
			" INTO CURSOR c_AllEmployees " + ;
			"ORDER BY 1"
if not empty(.oBizObj.cEmployeeID)
   .cboEmployees.value = .oBizObj.cEmployeeID
   .cboEmployees.controlsource = .oBizObj.cUserID
else
   .cboEmployees.value = .null. && we want to start with no selection
   .cboEmployees.controlsource = ""
   * .cboEmployees.ListIndex = 0
endif
And then in InterActiveChange event of the Combo:
IF NOT ISNULL(this.Value) AND NOT EMPTY(this.Value) AND EMPTY(this.ControlSource)
   LOCAL lComboValue
   lComboValue = this.Value
   this.controlsource = xxx.oBizObj.cUserID
   this.Value = lComboValue
ENDIF
(not tested)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform