Re: Combo Box based on Query sort not working - A2K



sara wrote:
Hi -

I have been asked to change a combo box display to sort in
alphabetical order. This is in an app I did not write, but it should
be simple enough!

The combo box is based on a table (and I've put in SQL and a query -
same problem)

It is 2 columns, bound column 1, width 0,2".

Query: SELECT Departments.DeptCode, Departments.DeptName
FROM Departments
ORDER BY Departments.DeptName;

When I run the SQL or the Query, stand-alone or from the properties
window, the sorting is correct (in Dept Name order).

The combo box still displays in DeptCode (Number) order.

I tried changing the number of rows to display (from 8 to 20) and the
column widths (to .5", 2") and nothing changes in the display! Still
shows 8 rows, in number order.

It's like it's not taking my changes or it's getting its direction for
the combo box from somewhere else.

Any ideas? Would a decompile be any help at all? There's lots of
code in the app, but little in the form and nothing with this combo
box.

Thanks -
Sara

You've verified that the SQL that works (listed above) is the rowsource for the combo?

If so, open up the code editor and press CTRL+F and look for
YourComboBoxName.Rowsource =
or
.Rowsource =
in the form's module.

Since you didn't write the app, it is possible that someone updates the rowsource elsewhere. If you find it, change it to reflect the right SQL statement.

Bonafide
http://www.youtube.com/watch?v=-6IKA0FRpnE
.



Relevant Pages

  • Re: SQl Data Provider Performance Issues
    ... Can you provide a complete sample app ... selects with a single inner join perforn OK. ... When I run the query from SQL ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: SQl Data Provider Performance Issues
    ... Can you provide a complete sample app ... selects with a single inner join perforn OK. ... When I run the query from SQL ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: SQl Data Provider Performance Issues
    ... selects with a single inner join perforn OK. ... When I run the query from SQL ... Seems to me there is some issue with the interaction of the app ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ODBC Timeout problems but very hard to pin down
    ... APP 1: Access 2000 database ... I ran SQL Profiler to capture the ... validated by SQL Server. ... As it happens, the default display contains ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Select DISTINCT...wont select DISTINCT
    ... I thought I was starting to get the hang of SQL, at least a little, but this ... [Advertising Entity Name], ... FROM [Display Entity Mapping]) ... your table structure is going to make your query not work in a usefull ...
    (microsoft.public.access.queries)