If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combo Box Problem
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 |
#2
|
|||
|
|||
Combo Box Problem
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? -- Build a little, test a little. "pjscott" wrote: 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 |
#3
|
|||
|
|||
Combo Box Problem
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 "KARL DEWEY" wrote: 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? -- Build a little, test a little. "pjscott" wrote: 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 |
#4
|
|||
|
|||
Combo Box Problem
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 -- Maurice Ausum "pjscott" wrote: 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 "KARL DEWEY" wrote: 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? -- Build a little, test a little. "pjscott" wrote: 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 |
#5
|
|||
|
|||
Combo Box Problem
On Fri, 9 Apr 2010 08:49:01 -0700, pjscott
wrote: 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! -- John W. Vinson [MVP] |
#6
|
|||
|
|||
Combo Box Problem
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 "John W. Vinson" wrote: On Fri, 9 Apr 2010 08:49:01 -0700, pjscott wrote: 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! -- John W. Vinson [MVP] . |
Thread Tools | |
Display Modes | |
|
|