Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboListBox
Message
From
30/07/1999 12:17:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/07/1999 11:58:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00247782
Message ID:
00248239
Views:
17
>Thanks for the response Marcia. My problem ended up being the screwy way I defined my indexes when I first setup the database, but the tips you gave me will really help me in the future.
>
>I am having a different problem now. I'm using the combo box to display Users!user_id, Users!last_name, and Users!first_name. It looks as though the data in the combo box is displayed sorted by Users!user_id because that is the primary key for the users file. Is that right? Well, anyway I want to be able to sort the data in the combo box by Users!last_name + Users!first_name so that the user could type in the last name to search through the list. Is there a way to do this or will I have to set up a query?
>
>Thanks for all of your help!
>Van
Van,
Combos are themselves screwy:) If you want to do an incrementalsearch then you should supply the search column as first column. Keep in mind that whenever you move in combo, rec pointer moves in related table (alias, fields setting). SQL rowsource sometimes better for this reason. It might be desirable too.

controlsource = "mytable.user_id"
Rowsource = [select last_name,first_name,user_id from users into cursor mycursor]
RowsourceType = 3 && SQL
BoundColumn = 3 && Return ID

would do what you want. Also having this code in lostfocus prevents headeaches :
with this
  .displayvalue = .value
  .value = .displayvalue
endwith	
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform