General information
Category:
Forms & Form designer
Hi Carlos.
>> I have a table index on "Clients.Name" and I have a combo Box to select Clients, I want the table be displayed in Alfabethic order in the combo Box. How to do that? <<
I take it that you want to use the combo box as a way to navigate to different clients in your clients table. If this is the case, the easiest way to set up your combo box is to make sure the clients table's controlling index is set to the Name index when you open the table in the form and set the combo's properties as follows:
RowSourceType = 6-Fields
RowSource = Clients.name, iclientPK (that is, assuming that you are using a primary key on you clients table called iClientPK).
BoundColumn = 2
BoundTo = .T.
Style = 2
You can leave the ControlSource of the combo blank. Whenever a new client is selected in the combo, the record pointer in the clients table will move to that client record. So if you have other controls on the form that are bound to fields in the client table, all you need to do is put a Thisform.Refresh() in the combo's valid to display the selected client info in the form.
HTH.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only