A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

populate a combo box in a form



 
 
Thread Tools Display Modes
  #1  
Old September 27th, 2006, 06:28 PM posted to microsoft.public.access.forms
John MilburySteen
external usenet poster
 
Posts: 4
Default 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  
Old September 27th, 2006, 07:01 PM posted to microsoft.public.access.forms
Kathleen
external usenet poster
 
Posts: 115
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.