Peter, I always load up my static lookup combo boxes using an SQL Statement into a cursor called curX_<<combo_Name>> and bind the key (usually a primary_Key) to the foreign key in the underlying form data.
I used to simply put the lookup file in the DE and then use the file alias as the Recordsource in the combobox but this produced lots of problems (which may have been fixed from VFP7 onwards) especially the ability for the users to update the lookup file inadvertently - which is a pain. At least using discrete cursors the underlying data is protected. The only drawback is that the lookup data needs to be refreshed if the lookup data is added to by another user, but this is a minor irritation. Dave Crozier -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Cushing Sent: 20 June 2007 11:30 To: [email protected] Subject: Re: Combobox Value Dave Crozier wrote: > AJ, > > If the second column is the PK then > > BoundTo=.T. > BoundColumn=2 > ColumnCount=2 > ColumnWidths=200,0 > > You can actually set the columncount to 1 > > Hi Dave, This was your answer to a question by AJ: > I have a combo box attached to a cursor with two columns. one column is > the primary key. The other is a text value. I want the combo box to > display the text value but return the primary key as its > "Object.Value". How would I go about doing such a thing? > TIA > A.J. Just been doing a bit of testing on this. What other settings do you use with these? I am thinking about controlsource/recordsource and recordsourcetype. Do you use a DE and do you use anything to update what the combo displays when you move to a new record. I have a way of doing this that works but want to see how others do it. TIA Peter [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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.

