Distinct values in Combo box (1 Viewer)

RyLane

Registered User.
Local time
Today, 07:35
Joined
Feb 4, 2014
Messages
60
Hello,

I have a combo box that I want to display titles of discussion that fall within a date range. I set up the query as such;

SELECT DISTINCT Discussions.Discussion_Title, Discussions.Discussion_Date
FROM Discussions
WHERE (((Discussions.Discussion_Date) Between ([forms]![DiscussionsForm2]![txtStartDate]) And ([forms]![DiscussionsForm2]![txtEndDate])))
ORDER BY Discussions.Discussion_Title;

It works but not quite the way I want it too. I would like the combobox to display only unique titles but right now it shows the same title if it was used on another date. I guess its showing distinct titles and dates, while I want it to display just distinct titles.

Thanks
 

plog

Banishment Pending
Local time
Today, 06:35
Joined
May 11, 2011
Messages
11,675
Get rid of the Discussion_Date in the SELECT clause.
 

RyLane

Registered User.
Local time
Today, 07:35
Joined
Feb 4, 2014
Messages
60
That does it. As I was reading the SQL I thought of that but figured I'd wait for to see what someone else had to say.
Thanks
 

Users who are viewing this thread

Top Bottom