Access 2007 is getting confused at what I am trying to ask it to do. This query is to go into a Combo Box to populate the control with the correct pick list choices.
Since it is a Combo Box, I end up aliasing the plain field name(s) with more meaningful names. I also need to include that name column in the ORDER BY clause to have the list sort alphabetically.
Pasting the query into an Access query object, when I switch to the Design View of the query, Access gets confused and doubles up the title column. Trying to execute it, I get a popup prompting to enter a value (presumably for the second of the duplicate column.)
Here is the SQL I would like Access to execute in the Combo Box control:
So in Design View, the first column is where title gets renamed to "Tool Type:"
Then second to the last column of the column list is a second title which has the sort option set.
I try to plop the sort back on the first column, delete that extra column, and Access is still not happy.
If I can not get the query to run in an Access query window, I see why I would have problems in the Combo Box!
And I have done far more wild queries in Combo Boxes, so no clue why this more simple query is putting up such a fight.
Suggestions please.
Since it is a Combo Box, I end up aliasing the plain field name(s) with more meaningful names. I also need to include that name column in the ORDER BY clause to have the list sort alphabetically.
Pasting the query into an Access query object, when I switch to the Design View of the query, Access gets confused and doubles up the title column. Trying to execute it, I get a popup prompting to enter a value (presumably for the second of the duplicate column.)
Here is the SQL I would like Access to execute in the Combo Box control:
Code:
SELECT t.title AS [Tool Type:],t.id FROM tmptblqry_metoolingtooltype AS t WHERE t.active <> 0 ORDER BY t.sort,t.title;
Then second to the last column of the column list is a second title which has the sort option set.
I try to plop the sort back on the first column, delete that extra column, and Access is still not happy.
If I can not get the query to run in an Access query window, I see why I would have problems in the Combo Box!

Suggestions please.