I have a simple reference library database based on one table. There is a
combo box where the user is to select a topic and the publications that I
have assigned to this topic are displayed in a sub form. The problem is that
I want the combo box to list each topic just once but it doesn't, it has an
entry for that topic for each publication. i.e one topic is 'housing' and
there are 6 items in the library that come under this so the combo box lists'
housing' 6 times. I have tried adding SELECT DISTINCT
to the code in the Rowsource but this doesn't do anything. Any suggestions?
This is my Rowsource code..
SELECT DISTINCT [tblReference Libary].[Reference LibraryID], [tblReference
Libary].Topic
FROM [tblReference Libary];
SusanV - 30 Jan 2007 16:52 GMT
Hi Jo,
You need to remove the ID field from the source query, as the ID *is*
distinct for every record and will cause all records to show. Try:
SELECT DISTINCT [tblReference Libary].Topic FROM [tblReference Libary];
Be sure that the Bound Column property is set to 1 as well (it's probably 2
now, given your Row source statement)

Signature
hth,
SusanV
>I have a simple reference library database based on one table. There is a
> combo box where the user is to select a topic and the publications that I
[quoted text clipped - 13 lines]
> Libary].Topic
> FROM [tblReference Libary];
Jo - 30 Jan 2007 17:25 GMT
I did what you suggested but then everything disapears from my combo box!
What will sort this out?
> I have a simple reference library database based on one table. There is a
> combo box where the user is to select a topic and the publications that I
[quoted text clipped - 9 lines]
> Libary].Topic
> FROM [tblReference Libary];
SusanV - 30 Jan 2007 17:31 GMT
What was the Bound Column property before?
Probably the easiest way to fix this is to delete the control and re-add it
using the wizard. Don't include the ID in the control this time, and modify
the RowSource to use Distinct as you did before.
>I did what you suggested but then everything disapears from my combo box!
> What will sort this out?
[quoted text clipped - 19 lines]
>> Libary].Topic
>> FROM [tblReference Libary];
fredg - 30 Jan 2007 17:55 GMT
> I did what you suggested but then everything disapears from my combo box!
> What will sort this out?
[quoted text clipped - 12 lines]
>> Libary].Topic
>> FROM [tblReference Libary];
Did you change the column Count from 2 to 1?
Did you change the width of the first column to 1"?

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jo - 31 Jan 2007 09:28 GMT
Thanks SusanV and Fredg, I have now got rid of the repeated entries in my
combo box but now when a topic is selected the corresponding publication
titles do not display in the table below. I will try and figure this out -
probably something to do with the after update function I guess...
I may post again if I get stuck!
Many thanks
Jo
> > I did what you suggested but then everything disapears from my combo box!
> > What will sort this out?
[quoted text clipped - 15 lines]
> Did you change the column Count from 2 to 1?
> Did you change the width of the first column to 1"?
SusanV - 31 Jan 2007 14:17 GMT
You need to refresh or requery the form...
> Thanks SusanV and Fredg, I have now got rid of the repeated entries in my
> combo box but now when a topic is selected the corresponding publication
[quoted text clipped - 35 lines]
>> Did you change the column Count from 2 to 1?
>> Did you change the width of the first column to 1"?