Alpha Sort Column (0) of Combo Box

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

Guest

My Combo box has ItemDescription and InternalItemNo based on a table Retail
Box Detail. Box come from another structure table Product Master List. The
list is sorted by InternalItemNo. For the field ItemDescription in the form,
how can I put the items in alpah order? I have items that have similar
names, but their internalitemno is quite different and so I need to be able
to search for Crazy Exciting on Steroids and not get only Crazy Exciting (two
different products).
 
You don't tell us what the rowsource for the combo-box is, but I suspect
it's probably just your table name. You need to explicitly order it by the
field you want it sorted on - something like:

SELECT InternalItemNo, ItemDescription FROM [Retail Box Detail] ORDER BY
ItemDescription;

You can set this up in a query design form if you click the button with
"..." just to the right of the Row Source entry in the combo-box's property
sheet. And you might want to include the DISTINCT keyword to prevent
duplicates, if they exist in your table.

HTH,

Rob
 
Back
Top