Alpha Order

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?
 
G

Guest

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]
 
D

Douglas J. Steele

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?
 
G

Guest

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top