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 a combo box in a form
Hi Access Gurus,
I have a form in Access 2000 which helps our department schedule classes. The form has a combo box which I want to populate with a list of classes from which to choose. That would be simple, but I want the combo box's pull down menu to appear with three columns: ClassName, CountOfRegistrationID (how many students enrolled so far in the class) and ClassID, with the third column bound. (ClassID is a meaningless number from the user's point of view.) In the row source I specify: SELECT ClassName, CountOfRegistrationID, ClassID FROM ClassQuery; ClassQuery is a group query. This doesn't work. However the following SQL statements work (col. 2 bound): SELECT ClassName, ClassID FROM ClassQuery; SELECT CountOfRegistrationID, ClassID FROM ClassQuery; Are combo boxes limited to two columns? |
#2
|
|||
|
|||
populate a combo box in a form
Combo boxes are not limited to 2 columns. Within the combo box properties,
there is a property that allows you to define the number of columns. Just enter a 3 in this property. Additionally, there's a property that allows you to define the column widths. Just put a comma in between each column width. For instance for the three columns you describe, you may want to put ..5", .5", 0". That will hide that last column but make it available, as well as allow it to be the bound column. There's also a property that allows you to define the width of all of the columns together. Make sure that this width is big enough to contain the total width of all of the individual columns combined. "John MilburySteen" wrote: Hi Access Gurus, I have a form in Access 2000 which helps our department schedule classes. The form has a combo box which I want to populate with a list of classes from which to choose. That would be simple, but I want the combo box's pull down menu to appear with three columns: ClassName, CountOfRegistrationID (how many students enrolled so far in the class) and ClassID, with the third column bound. (ClassID is a meaningless number from the user's point of view.) In the row source I specify: SELECT ClassName, CountOfRegistrationID, ClassID FROM ClassQuery; ClassQuery is a group query. This doesn't work. However the following SQL statements work (col. 2 bound): SELECT ClassName, ClassID FROM ClassQuery; SELECT CountOfRegistrationID, ClassID FROM ClassQuery; Are combo boxes limited to two columns? |
Thread Tools | |
Display Modes | |
|
|