Terry
Its not the combo that needs refreshing, its the grid. Yes I do have a gridRefresh method that runs in the valid after the grid columns are supposed to be updated. Its like the code never runs, but in debuf step mode it works, so weird.
>Chuck
>
>Not sure whether you're saying here that the combobox is not refreshed - there's no mention of it in your sample code. Off the top of my head:
> are you .Refresh()ing the combo after you add values to its source?
> are you .Requery()ing it?
>
>HTH
>
>Terry
>
>>I am having trouble understanding the combobox behavior. The combobox is in a grid. The rowsource is an array. Valid event calls a method that auto inserts values from array into row fields. Trouble is it acts intermittently. Some values it always run the method, others (majority) don't. I put a break point in the method and the valid call, neither stops at the point. The cursor advances to the next grid column but does not fill the fields it should and does not stop on the break point. Anyone knows why the combobox behaves this way?
>>
>>** valid event **
>>LOCAL lcAcctCode,lnIndex
>>lcAcctCode = allt(This.listitem(This.ListIndex))
>>lnIndex = This.ListIndex
>>IF EMPTY(lcAcctCode) OR lnIndex = 0
>> MESSAGEBOX('CANNOT LEAVE ACCOUNT CODE EMPTY',16+0,'INVALID ACCOUNT CODE')
>> nodefault
>>ELSE
>> .m_Update_Acct_Data(lcAcctCode)
>> .grdJobData.clmCopier.setFocus
>>ENDIF
>>
>>
>>** m_Update_Acct_Data() method **
>>lparameters cCode
>>local nPos, nRow
>>store 0 to nPos, nRow
>>
>>with ThisForm
>> nPos = ASCAN(.aAccts,cCode)
>> nRow = aSubscript(.aAccts,nPos,1)
>> if nPos != 0
>> REPLACE org_code WITH SUBSTR(Trim(.aAccts(nRow,2)),3)
>> REPLACE eo WITH .aAccts(nRow,3)
>> REPLACE Modl WITH .aAccts(nRow,5)
>> REPLACE Grant WITH .aAccts(nRow,6)
>> REPLACE Contract WITH .aAccts(nRow,7)
>> REPLACE Proj WITH .aAccts(nRow,8)
>> endif
>>endwith
Extreme Programming = Plan -> Design -> Code -> Test