Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
My combo just won't show its value
Message
From
19/07/2007 06:46:57
 
 
To
18/07/2007 13:17:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01241634
Message ID:
01241803
Views:
31
>>I have a text box next to a combo (set at drop-down list)
>>
>>The Text box displays the PK of a record and the combo is supposed to display the record description field.
>>
>>If I select a combobox item it displays OK and the assoc PK displays in the textbox.
>>
>>BUT, on invokation of the form I cannot get any value to diaply in the combo - it's just blank.
>>
>>I've tried just about every perm. of .displayitem, ,.value, .Boundcolumn, .bound, etc., etc. but nowt works.
>>
>>Worse is I've a similar text box/combo combination on another form and though I've mirrored its settings I still can't geyt it to cough up. What gives? Any suggestions?
>>
>>'ppreciate it.
>>
>>Terry
>
>Your PK is integer and combo.boundto = false?
>Combo has an inputmask setting?
>W/o properties and code hard to guess.
>Cetin

Hi Cetin and Naomi

You're right, it's hard to say w/o the PEMs, but I'd tried so many permutations that I wouldn't know which to offer, and it was home time when I eventually wrote the message. Anyway, here are the "current" set. The combo is called .cboZoneGVar and, as you can see, I've commented out one attempt in the form's .Init(). I've also tried various similar code in the combo's .Init() but to no avail.

Why have VFP's combos always been so bloody fiddly! ?
Form's .Init():
______________
LOCAL	lcTablePath

Set Date BRITISH
Set Mark to "-"
mclDialogForm::Init()

Set DATABASE to mclMPFac

Set MULTILOCKS on
With thisform 
  .cFolder 		= SYS(5) + SYS(2003)
  If sysCheckServer( "Excel.Application")	&& If Excel on board PC
      .oExcel		= CREATEOBJECT( "excel.application")
      .lExcelOK		= .T.
  Else
      .chkExpSS.enabled	= .F.
  Endif 
  .nVarID			= ZONEGVAR.VAR_ID
* TPMcD For Now	  .cboZoneGVar.value	= ZONEGVAR.VAR_DESC
* TPMcD For Now	  .cboZoneGVar.Requery()
  .lblApply.Caption	= "- All Zones -"
  .lblApply.Visible	= .T.
  .lmUpdateExpFileName()
Endwith 
cboZoneGVar's props:
___________________
BoundColumn   = 2
BoundTo       = .T.
RowSource     = ZoneGVar.Var_Desc,Var_ID
RowSource     = 6 - fields
ColumnWidths  = 321,47
DisplayValue  = (None)
FirstElement  = 1
Style         = 2
Cheers

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform