comb box item order

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI there,

One of my comb box is based on one column of a table and the column is
sorted, by when it is displayed, it is in opposite order. Could you figure it
out.

clara

thanks you very mcuh
 
In form design view, click the combo box to select it, then click View >
Properties. Click the Data tab, click Row Source, and click the three dots.
In the query design grid that appears, select Ascending in the Sort row
under the field by which you wish to sort. The primary sort order field
needs to be to the left of any other sort order field in the query design
view. For instance, if you wish to sort by State, then City, State needs to
be to the left of City in the Row Source design grid (the three dots thing).
Sorting in the table makes no difference to the order in which records
appear. That is established by the Row Source query, even if it is not a
named query.
 
clara said:
HI there,

One of my comb box is based on one column of a table and the column is
sorted, by when it is displayed, it is in opposite order. Could you figure
it
out.

clara

thanks you very mcuh

When you select records from a table, you can't be guaranteed of the order
of those records unless you set the order yourself. You say your combo box
is based on 'one column of a table'; what does the RowSource of the combo
box look like? If it's a simple SELECT statement like

SELECT <column> FROM <table>

you might try adding an ORDER BY clause to the statement:

SELECT <column> FROM <table> ORDER BY <column>


HTH,

Carl Rapson
 
Back
Top