Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox display value goes blank
Message
From
07/07/1999 07:49:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Combobox display value goes blank
Miscellaneous
Thread ID:
00238183
Message ID:
00238183
Views:
43
All:
I'm having a problem with a combobox sub-class. My problem is that the the boundto column (2), _EmpNum, is a 3 charactere field (013) that is a number expression, but vartypes as a"C". The correct text displays in the combobox initially, but when I change to a different item, the combobox goes blank. I have a similar sub-class that does work. I've run both through the debugger, but am at a dead -end. According to the Hacker's Guide, I should be able to see the array by looking at the List or ListItem property. However, these are "". Is this because I've used a Rowsource with a Rowsource type of 6 (fields)?

TIA
Mike

I've included event and most method code. The GotFocus and LostFocus events alter the dbl-click speed to allow more time for incremental searching. Refresh Event calls dodefault and Requery Event.

* BEGIN FORM1.DBEVEMPLCOMBO.INIT()
* Description:
* Parameters: -
* Returns:
* Notes: 1.
* 2.
* Revisions: 07/01/1999 - MWT
* - Created
if empty(this.AliasName)
this.AliasName = sys(2015) && Unique procedure name _999999999 pattern
use dBEV!pv_MASTEMP in 0 again alias (this.AliasName) noData
this.rowsource = this.AliasName+ ".ENAME,_empnum,_paytext,_altPaytext"
endif

this.value = eval(this.Fieldname)
this.controlsource = (this.Fieldname)
dodefault()

RETURN .T.


END FORM1.DBEVEMPLCOMBO.INIT()
* BEGIN FORM1.DBEVEMPLCOMBO.REQUERY()
* Description:
* Parameters: -
* Returns:
* Notes: 1.
* 2.
* Revisions: 07/01/1999 - MWT
* - Created
public gcPayCode

gcPayCode = (this.PayCode)
requery(this.AliasName)

dodefault()

END FORM1.DBEVEMPLCOMBO.REQUERY()

Pv_mastemp (view)
SELECT Mastemp.employeeno, Mastemp.ename, Mastemp.eemp,;
ROUND(VAL(Mastemp.eemp),0) AS _empnum, Mastemp.epaycd,;
paycode(Mastemp.epaycd) AS _paytext, Mastemp.ealtpaycd,;
paycode(Mastemp.ealtpaycd) AS _altpaytext, Mastemp.egentyps,;
Mastemp.ebovrdpct, Mastemp.elovrdpct, Mastemp.esovrdpct,;
Mastemp.ewovrdpct, Mastemp.ebcompct, Mastemp.elcompct, Mastemp.escompct,;
Mastemp.ewcompct, Mastemp.ecomtyps, Mastemp.bcomm, Mastemp.lcomm,;
Mastemp.scomm, Mastemp.wcomm, Mastemp.xcomm, Mastemp.bmanager,;
Mastemp.lmanager, Mastemp.smanager, Mastemp.wmanager, Mastemp.xmanager;
FROM mastemp;
WHERE IIF(AT(Mastemp.epaycd,(?gcPayCode))>0,.T.,.F.) = .T.;
OR (IIF(AT(Mastemp.ealtpaycd,(?gcPayCode))>0,.T.,.F.) = .T.)
Mike
Next
Reply
Map
View

Click here to load this message in the networking platform