Combo boxes

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

Guest

Please consider providing instructions in the Access Help facility on how to
avoid entries in a Combo box from being sorted. The "not sorted" facility in
the query section doesn't seem to work. All the Combo box entries appear in
alphabetic order by default. I want the items in the Combo box to appear in
the order I entered them ie Detached house, Semi-detached house, Bungalow,
Flat etc but, despite the kind suggestions of two people in the News Groups I
can't manage to achieve this (and yet it seems as though it should be simple).
 
Thanks for responding, Brendan!

It's Table/Query and it's calling up a query. I didn't select a sort order
for the query although I tried, unsuccessfully, to click on (non-sorted) -
nothing happened. Is there a better way of doing this?
 
Unless you put an ORDER BY clause in your query, you have no control over
the sort order.

To return rows in the order in which you entered them, you need a field that
increments with each addition. Putting a CreatedDtm Date field in your
table, with a default value being Now(), would server this purpose. You
would then sort your query on CreatedDtm.
 
See Doug's suggestion elsewhere in this thread.

Just as a bit of background explanation - I'm guessing that your table has a
text field as its primary key? When you don't specify any sort order, you'll
*generally* get records sorted by the primary key. (You can't always count
on that, though, which is why we always say that if you need a specific sort
order, you must specify it in the ORDER BY clause.) This is why you're
getting records in alphabetic order when you don't specify any sort order.
 
Back
Top