B
Bender
I am trying to create a search form with a combobox and I want to the
populate combo box to be with the unique Budget codes but there are
many records with the same budget codes. I was hoping to create a
query on my "Projects" table to search for the duplicate "Budget
Codes" and only return one instance of a "Budget Code".
I am a novice when comes to SQL statements but, currently my query
looks like:
SELECT Projects.[Budget Subactivity]
FROM Projects
WHERE (((Projects.[Budget Subactivity]) In (SELECT [Budget
Subactivity] FROM [Projects] As Tmp GROUP BY [Budget Subactivity]
HAVING Count(*)>1 )));
Its returning:
2911
2911
2911
2912
2912
2912
2913
2913
2913
291X
291X
I would like the query to return:
2911
2912
2913
291X
without having to create a table of unique Budget Codes.
Does anyone have any tips / suggestions?
populate combo box to be with the unique Budget codes but there are
many records with the same budget codes. I was hoping to create a
query on my "Projects" table to search for the duplicate "Budget
Codes" and only return one instance of a "Budget Code".
I am a novice when comes to SQL statements but, currently my query
looks like:
SELECT Projects.[Budget Subactivity]
FROM Projects
WHERE (((Projects.[Budget Subactivity]) In (SELECT [Budget
Subactivity] FROM [Projects] As Tmp GROUP BY [Budget Subactivity]
HAVING Count(*)>1 )));
Its returning:
2911
2911
2911
2912
2912
2912
2913
2913
2913
291X
291X
I would like the query to return:
2911
2912
2913
291X
without having to create a table of unique Budget Codes.
Does anyone have any tips / suggestions?