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
|
|||
|
|||
Populate combo-box
I have a table that has multiple Site #'s and more than one year associated
to a site. So my table looks like this: 1001 1998 1001 2000 1002 1999 1002 2001 1002 2005 I have a form that I want to show one Site #, with a combo-box listing the Years that are associated with the Site#. How can this bee done? I've been trying for a good day, with no success. Thanks! |
#2
|
|||
|
|||
Populate combo-box
Check this link how to filter a combo using another field in the form
http://www.mvps.org/access/forms/frm0028.htm -- Please respond to the group if your question been answered or not, so other can refer to it. Thank you and Good luck "Kou Vang" wrote: I have a table that has multiple Site #'s and more than one year associated to a site. So my table looks like this: 1001 1998 1001 2000 1002 1999 1002 2001 1002 2005 I have a form that I want to show one Site #, with a combo-box listing the Years that are associated with the Site#. How can this bee done? I've been trying for a good day, with no success. Thanks! |
#3
|
|||
|
|||
Populate combo-box
I tried both of the ways, and was still unsuccessful? I know that there is a
simple solution, not just sure what it exactly is? "Ofer" wrote: Check this link how to filter a combo using another field in the form http://www.mvps.org/access/forms/frm0028.htm -- Please respond to the group if your question been answered or not, so other can refer to it. Thank you and Good luck "Kou Vang" wrote: I have a table that has multiple Site #'s and more than one year associated to a site. So my table looks like this: 1001 1998 1001 2000 1002 1999 1002 2001 1002 2005 I have a form that I want to show one Site #, with a combo-box listing the Years that are associated with the Site#. How can this bee done? I've been trying for a good day, with no success. Thanks! |
#4
|
|||
|
|||
Populate combo-box
The examples in the link will work - but if you want something that is less
code ... place your mouse curser in the row source property of the list box you want to populate, a build button will uppear to the right. Click on it and create your query that you want for the row source. In the query, Right click in the the criteria row of the field you want to filter (which for you probably means the year field is visible and the site # field is not visible but is where you would enter the criteria). Select build from the drop down list - navigate through the forms in the builder and find the field to filter on, click paste and then OK. Now instead of saving the query, close it and access will ask you if you want to paste the sql for the queryy into the row source property - say yes or ok or whatever ... now all you need is .requery in code behind the form triggered from the controls after update event. If you are not sure how to do that search fro requery in the help file. Kou Vang wrote: I tried both of the ways, and was still unsuccessful? I know that there is a simple solution, not just sure what it exactly is? Check this link how to filter a combo using another field in the form [quoted text clipped - 12 lines] Years that are associated with the Site#. How can this bee done? I've been trying for a good day, with no success. Thanks! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Populate a text box based on the selection of a combo box. | Itman79 | Using Forms | 5 | September 11th, 2005 05:12 PM |
Disable text box via combo box | StuJol | Using Forms | 1 | August 10th, 2005 09:29 AM |
Combo Box to Populate a Subform | kda1234 | Using Forms | 2 | June 8th, 2005 01:16 PM |
Populate text boxes with hidden combo box columns | winsa | Using Forms | 1 | April 13th, 2005 02:36 AM |
2 combo box, 2 txt boxes - Populate problem | S Jackson | Using Forms | 5 | December 7th, 2004 09:58 PM |