Combo Box Problem

P

pjscott

I'm using sql 2000 and Access 2007.

I have 2 forms. One form to Enter data and the 2nd to Edit the data.

The Edit form is my problem. The Edit form Record Source is a query that
displays all the records.

I have a combo box assoicated with the Name field. The Edit form's Row
Source is the query.

The name combo box when clicked will display the same name for each record
that's enter under that name.

I have tried creating both a single form and a form / subform. I have also
tried using the name table as the combo box record source but this diaplays
all the names even if they don't have a record assoicated with them.

What do I need to do to get the combo box to display a single name even if
there's several records associated with that name.

Thanks for the help,

Paul
 
K

KARL DEWEY

The name combo box when clicked will display the same name for each record
that's enter under that name.
I do not follow as to what your problem is as a combo makes all names
available to select from but dispalys the one selected.
Is it not doing this?
 
P

pjscott

If there's 3 records with the same name the name displays 3 times in the
combo box.

I need for the name to display single time then I can navigate through the
different records on the form.

Thanks,

Paul
 
M

Maurice

You have based the combobox source on your table. So what you need to do is
create a query based on your table. Next choose the field you would like to
see (Name) and add that to the grid. Now that will show all the names
including the duplicates. To remove the duplicates you have to make the SQL
statement distinct.

When in query design goto the design button (far left). From the arrow
choose SQL you will see the SQL statement. Now after the word Select add the
word Distinct and view the result.

hth
 
J

John W. Vinson

If there's 3 records with the same name the name displays 3 times in the
combo box.

I need for the name to display single time then I can navigate through the
different records on the form.

Use a different query than the form's recordsource as the rowsource; in
particular, use a query which retrieves only one instance of each name. This
could be based on the names table, or use a Unique Values query to display
each name only once - not sure how your tables are structured so I can't say
for sure!
 
P

pjscott

Thanks for the help. It's time for the weekend so I'll give these a try on
Monday.

Hope you have a good weekend,

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top