>>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")
.oExcel = CREATEOBJECT( "excel.application")
.lExcelOK = .T.
Else
.chkExpSS.enabled = .F.
Endif
.nVarID = ZONEGVAR.VAR_ID
.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.