Could be that you need to set the combo's Value or Displayvalue property to 
what you want to see before calling the Refresh.

--
rk

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Desmond 
Lloyd
Sent: Wednesday, February 27, 2013 5:59 PM
To: [email protected]
Subject: Re: VFP9: Populating a Combo Box

Woohooo...  Putting it in the init of the form worked wonders.....

Thanks Again,
Desmond

> On 27 February 2013 16:50, Stephen Russell <[email protected]> wrote:
>
>> On Wed, Feb 27, 2013 at 4:47 PM, Desmond Lloyd 
>> <[email protected]
>> >wrote:
>>
>> > Had a problem populating a combo box in December,  someone was kind
>> enough
>> > to recommend using the requery event in combination with a refresh 
>> > to display the first item or record from the query.
>> >
>> > Have tried to do that,  but no matter what I do it comes up blank.  
>> > If I cliick on the down arrow of the combo box the list is 
>> > displayed, incremental search is turned on and all that works fine.
>> >
>> > Can the first item from the list (query) be displayed?
>> >
>> > Here is the code I have in the requery event:
>> >
>> > select alltrim(company)+' ('+alltrim(custno)+')' as cust,custno 
>> > from mycustfile into cursor pick_cust order by company go top
>> > this.Refresh()
>> > ----------------
>>
>>
>> Stuff the keyboard with a F4 or Ctrl+F4 . :)
>>
>> --
>> Stephen Russell
>> Sr. Analyst
>> Ring Container Technology
>> Oakland TN
>>
>> 901.246-0159 cell
>>
>>
>> --- StripMime Report -- processed MIME parts --- 
>> multipart/alternative
>>   text/plain (text body -- kept)
>>   text/html
>> ---
>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD0442188CB85B7@ACKBWDDQH1.artfact.local
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to