Chris,
Have you tried creating 2 SQL statements. One for Sort1 and one for Sort2.
Then, set the combo RowSource to the appropriate SQL, and then change your combo column
widths.
> If tglLUC.Caption = "NUMBER" Then
> With cmbLUC
.RowSource = "SQL 1 statement here"
> .ColumnWidths = "0;0;8"
> .ListWidth = 6804
> .Width = 3402
> End With
> LUC = True
> tglLUC.Caption = "NAME"
> Else
> With cmbLUC
.RowSource = "SQL 2 statement here"
> .ColumnWidths = "0;3;0"
> .ListWidth = 1701
> .Width = 1701
> End With
> tglLUC.Caption = "NUMBER"
> End If
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
"chriske911" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a combobox which can be triggered by a toggle button to show either a customer's
>number or the customer's name
> off course there is an ID field behind the screens so I can jump to the customer's
> details
>
> since I hate sending data over the network if it is not really necessary I toggle by
> setting the visible columns of that combobox
> like this:
>
> If tglLUC.Caption = "NUMBER" Then
> With cmbLUC
> .ColumnWidths = "0;0;8"
> .ListWidth = 6804
> .Width = 3402
> End With
> LUC = True
> tglLUC.Caption = "NAME"
> Else
> With cmbLUC
> .ColumnWidths = "0;3;0"
> .ListWidth = 1701
> .Width = 1701
> End With
> tglLUC.Caption = "NUMBER"
> End If
>
> but the default sort order is by number and so the names are not sorted alphabetically
> can I change the sortorder of this list without having to retrieve it from the backend?
>
> thnx
>
>