Alpha Order

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

Guest

My Access2000 tables are linked to SQL tables.
I added a value to a table thru Access which also updated the SQL table.
The data is displayed on the form in a combobox but it will not display in
alphabetical order!!
Even though the Access table is alphabetical. I tryed deleting the combobox
and recreating it and everything else I can think of - but it still comes up
out of order..
Suggestions?
 
Here is the Row Source - it displays the right data - I just cannot get it to
be alpha.

SELECT [t_DrugQuanity].[DrugName], [t_DrugQuanity].[Strength],
[t_DrugQuanity].[Disp per 30 days] FROM [t_DrugQuanity]
 
Change it to

SELECT [t_DrugQuanity].[DrugName], [t_DrugQuanity].[Strength],
[t_DrugQuanity].[Disp per 30 days] FROM [t_DrugQuanity]
ORDER BY [t_DrugQuanity].[DrugName]

Tables don't have an order to them: they're "sacks of data", where the DBMS
puts the data wherever it fits. The only way to ensure a specific order is
to use a query with an ORDER BY clause (or, in the case of reports, to use
the Sorting and Grouping dialog of the report, since reports don't even
respect the sort order of queries)


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Dan @BCBS said:
Here is the Row Source - it displays the right data - I just cannot get it
to
be alpha.

SELECT [t_DrugQuanity].[DrugName], [t_DrugQuanity].[Strength],
[t_DrugQuanity].[Disp per 30 days] FROM [t_DrugQuanity]





KARL DEWEY said:
What is the Row Source for the ComboBox?
 
Fantastic !!!!!
Thanks




Douglas J. Steele said:
Change it to

SELECT [t_DrugQuanity].[DrugName], [t_DrugQuanity].[Strength],
[t_DrugQuanity].[Disp per 30 days] FROM [t_DrugQuanity]
ORDER BY [t_DrugQuanity].[DrugName]

Tables don't have an order to them: they're "sacks of data", where the DBMS
puts the data wherever it fits. The only way to ensure a specific order is
to use a query with an ORDER BY clause (or, in the case of reports, to use
the Sorting and Grouping dialog of the report, since reports don't even
respect the sort order of queries)


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Dan @BCBS said:
Here is the Row Source - it displays the right data - I just cannot get it
to
be alpha.

SELECT [t_DrugQuanity].[DrugName], [t_DrugQuanity].[Strength],
[t_DrugQuanity].[Disp per 30 days] FROM [t_DrugQuanity]





KARL DEWEY said:
What is the Row Source for the ComboBox?
--
KARL DEWEY
Build a little - Test a little


:

My Access2000 tables are linked to SQL tables.
I added a value to a table thru Access which also updated the SQL
table.
The data is displayed on the form in a combobox but it will not display
in
alphabetical order!!
Even though the Access table is alphabetical. I tryed deleting the
combobox
and recreating it and everything else I can think of - but it still
comes up
out of order..
Suggestions?
 
Back
Top