What is wrong with my query?

SteveGr

Registered User.
Local time
Today, 12:27
Joined
Aug 2, 2002
Messages
65
I run a sql query for my combo box.
when I change to sort ascending on any field, it stops working. When I take the "sort by" out of the query, it's OK.
I had this sorting before. . . any ideas anyone?

Thanks, Stevegr
 
I tried that and it didn't work either
 
Works but not set Ascending:
SELECT [QRY_COMBINE_TABLES Query].[JOB NUMBER], [QRY_COMBINE_TABLES Query].[JOB NAME], [QRY_COMBINE_TABLES Query].VERSION, [QRY_COMBINE_TABLES Query].[FORM ID], [QRY_COMBINE_TABLES Query].[NET GOOD PRESS COUNT]
FROM [QRY_COMBINE_TABLES Query];

Does not work, set sorted to Ascending:
SELECT [QRY_COMBINE_TABLES Query].[JOB NUMBER], [QRY_COMBINE_TABLES Query].[JOB NAME], [QRY_COMBINE_TABLES Query].VERSION, [QRY_COMBINE_TABLES Query].[FORM ID], [QRY_COMBINE_TABLES Query].[NET GOOD PRESS COUNT]
FROM [QRY_COMBINE_TABLES Query]
ORDER BY [QRY_COMBINE_TABLES Query].[JOB NUMBER], [QRY_COMBINE_TABLES Query].[JOB NAME], [QRY_COMBINE_TABLES Query].VERSION;
 
... And all 3 fields are displayed in the combo box when the drop-down is clicked, but they are not sorted by the Job #?
 
Your posted sql looks ok. Try copying it into the SQL view of a query and see if it will convert to the sql view. Compare a successful sql view view with what you're doing.

Similarly build your query in the qbe frame and run it, then run it in the sql view to see what you get.

The problem is something simple.
 

Users who are viewing this thread

Back
Top Bottom