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  

Combo Box Columns



 
 
Thread Tools Display Modes
  #1  
Old November 4th, 2005, 02:09 PM
MJFrog
external usenet poster
 
Posts: n/a
Default Combo Box Columns

I have a simple combo box that is taking its row source from a newly created
table that has only two colums - the key (just a list of continuous numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to display the
numbers from the key, how do I get it to just show the surnames from column 2
of the table?

Can anyone help?
  #2  
Old November 4th, 2005, 03:14 PM
Douglas J Steele
external usenet poster
 
Posts: n/a
Default Combo Box Columns

Column Count: 2
Column Widths: 0";1"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"MJFrog" wrote in message
...
I have a simple combo box that is taking its row source from a newly

created
table that has only two colums - the key (just a list of continuous

numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to display the
numbers from the key, how do I get it to just show the surnames from

column 2
of the table?

Can anyone help?



  #3  
Old February 21st, 2006, 12:01 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Combo Box Columns

I would like to expand on Mr/s. Frog's question. I also have cbo's with
multiple columns. The column counts and widths are as suggested by Mr.
Steele. When I drop down the list box to display the list of values in the
domain, all the columns in the cbo are displayed. However, after a value is
selected, only the first column is displayed. How do I display all columns
after a value is chosen by the user? Thank you.

"Douglas J Steele" wrote:

Column Count: 2
Column Widths: 0";1"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"MJFrog" wrote in message
...
I have a simple combo box that is taking its row source from a newly

created
table that has only two colums - the key (just a list of continuous

numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to display the
numbers from the key, how do I get it to just show the surnames from

column 2
of the table?

Can anyone help?




  #4  
Old February 21st, 2006, 12:30 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Combo Box Columns

you can't, within the combo box control itself. only the first non-zero
width column will be displayed in the control after a selection is made from
the droplist. but you *can* display the values from the other columns. just
add an unbound textbox to the form, for each column value you want to
display. set each textbox's ControlSource property to reference a specific
column, as

=cboName.Column(n)

replace cboName with the name of the combo box control, of course. replace
the "n" value, within the parentheses, with the index value of the column
you want to display. the combo box column index is zero-based, so the first
column (counting from left to right) is 0, the second column is 1, the third
column is 2, etc.

hth


"David Berg" wrote in message
...
I would like to expand on Mr/s. Frog's question. I also have cbo's with
multiple columns. The column counts and widths are as suggested by Mr.
Steele. When I drop down the list box to display the list of values in the
domain, all the columns in the cbo are displayed. However, after a value

is
selected, only the first column is displayed. How do I display all columns
after a value is chosen by the user? Thank you.

"Douglas J Steele" wrote:

Column Count: 2
Column Widths: 0";1"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"MJFrog" wrote in message
...
I have a simple combo box that is taking its row source from a newly

created
table that has only two colums - the key (just a list of continuous

numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to display

the
numbers from the key, how do I get it to just show the surnames from

column 2
of the table?

Can anyone help?






  #5  
Old February 21st, 2006, 12:35 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Combo Box Columns

You can't, at least, you can't in the combo box.

You can, however, add text boxes to your form that you can populate from the
combo box in its AfterUpdate event.

If, for example, the 2nd and 3rd columns were something you wanted to put
into text boxes, you'd put code like:

Me.txtField1 = Me.MyComboBox.Column(1)
Me.txtField2 = Me.MyComboBox.Column(2)

in that event. Note that the Column collection starts counting at 0.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"David Berg" wrote in message
...
I would like to expand on Mr/s. Frog's question. I also have cbo's with
multiple columns. The column counts and widths are as suggested by Mr.
Steele. When I drop down the list box to display the list of values in the
domain, all the columns in the cbo are displayed. However, after a value
is
selected, only the first column is displayed. How do I display all columns
after a value is chosen by the user? Thank you.

"Douglas J Steele" wrote:

Column Count: 2
Column Widths: 0";1"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"MJFrog" wrote in message
...
I have a simple combo box that is taking its row source from a newly

created
table that has only two colums - the key (just a list of continuous

numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to display
the
numbers from the key, how do I get it to just show the surnames from

column 2
of the table?

Can anyone help?






  #6  
Old February 21st, 2006, 12:56 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Combo Box Columns

Thank you, Tina. I tried your suggestion; I specified
"cboSelTransect.Column(2)" for the Control Source. When I bring up the form -
and even after I select a value from the domain of cboSelTransect - the value
in the text box is "#Name?"
- David

"tina" wrote:

you can't, within the combo box control itself. only the first non-zero
width column will be displayed in the control after a selection is made from
the droplist. but you *can* display the values from the other columns. just
add an unbound textbox to the form, for each column value you want to
display. set each textbox's ControlSource property to reference a specific
column, as

=cboName.Column(n)

replace cboName with the name of the combo box control, of course. replace
the "n" value, within the parentheses, with the index value of the column
you want to display. the combo box column index is zero-based, so the first
column (counting from left to right) is 0, the second column is 1, the third
column is 2, etc.

hth


"David Berg" wrote in message
...
I would like to expand on Mr/s. Frog's question. I also have cbo's with
multiple columns. The column counts and widths are as suggested by Mr.
Steele. When I drop down the list box to display the list of values in the
domain, all the columns in the cbo are displayed. However, after a value

is
selected, only the first column is displayed. How do I display all columns
after a value is chosen by the user? Thank you.

"Douglas J Steele" wrote:

Column Count: 2
Column Widths: 0";1"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"MJFrog" wrote in message
...
I have a simple combo box that is taking its row source from a newly
created
table that has only two colums - the key (just a list of continuous
numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to display

the
numbers from the key, how do I get it to just show the surnames from
column 2
of the table?

Can anyone help?






  #7  
Old February 21st, 2006, 12:59 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Combo Box Columns

OK. I got it. I forgot the '='.
Thanks to both you and Mr. Steele.
- David

"tina" wrote:

you can't, within the combo box control itself. only the first non-zero
width column will be displayed in the control after a selection is made from
the droplist. but you *can* display the values from the other columns. just
add an unbound textbox to the form, for each column value you want to
display. set each textbox's ControlSource property to reference a specific
column, as

=cboName.Column(n)

replace cboName with the name of the combo box control, of course. replace
the "n" value, within the parentheses, with the index value of the column
you want to display. the combo box column index is zero-based, so the first
column (counting from left to right) is 0, the second column is 1, the third
column is 2, etc.

hth


"David Berg" wrote in message
...
I would like to expand on Mr/s. Frog's question. I also have cbo's with
multiple columns. The column counts and widths are as suggested by Mr.
Steele. When I drop down the list box to display the list of values in the
domain, all the columns in the cbo are displayed. However, after a value

is
selected, only the first column is displayed. How do I display all columns
after a value is chosen by the user? Thank you.

"Douglas J Steele" wrote:

Column Count: 2
Column Widths: 0";1"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"MJFrog" wrote in message
...
I have a simple combo box that is taking its row source from a newly
created
table that has only two colums - the key (just a list of continuous
numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to display

the
numbers from the key, how do I get it to just show the surnames from
column 2
of the table?

Can anyone help?






  #8  
Old February 21st, 2006, 01:06 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Combo Box Columns

you forgot the equal (=) sign, as

=cboSelTransect.Column(2)

hth


"David Berg" wrote in message
...
Thank you, Tina. I tried your suggestion; I specified
"cboSelTransect.Column(2)" for the Control Source. When I bring up the

form -
and even after I select a value from the domain of cboSelTransect - the

value
in the text box is "#Name?"
- David

"tina" wrote:

you can't, within the combo box control itself. only the first non-zero
width column will be displayed in the control after a selection is made

from
the droplist. but you *can* display the values from the other columns.

just
add an unbound textbox to the form, for each column value you want to
display. set each textbox's ControlSource property to reference a

specific
column, as

=cboName.Column(n)

replace cboName with the name of the combo box control, of course.

replace
the "n" value, within the parentheses, with the index value of the

column
you want to display. the combo box column index is zero-based, so the

first
column (counting from left to right) is 0, the second column is 1, the

third
column is 2, etc.

hth


"David Berg" wrote in message
...
I would like to expand on Mr/s. Frog's question. I also have cbo's

with
multiple columns. The column counts and widths are as suggested by Mr.
Steele. When I drop down the list box to display the list of values in

the
domain, all the columns in the cbo are displayed. However, after a

value
is
selected, only the first column is displayed. How do I display all

columns
after a value is chosen by the user? Thank you.

"Douglas J Steele" wrote:

Column Count: 2
Column Widths: 0";1"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"MJFrog" wrote in message
...
I have a simple combo box that is taking its row source from a

newly
created
table that has only two colums - the key (just a list of

continuous
numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to

display
the
numbers from the key, how do I get it to just show the surnames

from
column 2
of the table?

Can anyone help?








  #9  
Old February 21st, 2006, 01:07 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Combo Box Columns

okay, good job. i didn't see this post until i'd already responded to the
previous one.


"David Berg" wrote in message
...
OK. I got it. I forgot the '='.
Thanks to both you and Mr. Steele.
- David

"tina" wrote:

you can't, within the combo box control itself. only the first non-zero
width column will be displayed in the control after a selection is made

from
the droplist. but you *can* display the values from the other columns.

just
add an unbound textbox to the form, for each column value you want to
display. set each textbox's ControlSource property to reference a

specific
column, as

=cboName.Column(n)

replace cboName with the name of the combo box control, of course.

replace
the "n" value, within the parentheses, with the index value of the

column
you want to display. the combo box column index is zero-based, so the

first
column (counting from left to right) is 0, the second column is 1, the

third
column is 2, etc.

hth


"David Berg" wrote in message
...
I would like to expand on Mr/s. Frog's question. I also have cbo's

with
multiple columns. The column counts and widths are as suggested by Mr.
Steele. When I drop down the list box to display the list of values in

the
domain, all the columns in the cbo are displayed. However, after a

value
is
selected, only the first column is displayed. How do I display all

columns
after a value is chosen by the user? Thank you.

"Douglas J Steele" wrote:

Column Count: 2
Column Widths: 0";1"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"MJFrog" wrote in message
...
I have a simple combo box that is taking its row source from a

newly
created
table that has only two colums - the key (just a list of

continuous
numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to

display
the
numbers from the key, how do I get it to just show the surnames

from
column 2
of the table?

Can anyone help?








  #10  
Old February 21st, 2006, 08:17 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Combo Box Columns

This brings me to the next question. How do I reference the different columns
in a query? I have a report, whose query wants to contain the clause: HAVING
tabname.colname = [forms]![formname].[cboBoxname].[Column(1)]. Referencing
the column (at least using this syntax) is not recognized. Is there a way to
reference the individual columns in a combo box in a query? If not, I could,
as a workaround, concatenate the columns to form the key of the combo box and
do likewise to the columns from the query in the HAVING clause. Thanks.

"tina" wrote:

okay, good job. i didn't see this post until i'd already responded to the
previous one.


"David Berg" wrote in message
...
OK. I got it. I forgot the '='.
Thanks to both you and Mr. Steele.
- David

"tina" wrote:

you can't, within the combo box control itself. only the first non-zero
width column will be displayed in the control after a selection is made

from
the droplist. but you *can* display the values from the other columns.

just
add an unbound textbox to the form, for each column value you want to
display. set each textbox's ControlSource property to reference a

specific
column, as

=cboName.Column(n)

replace cboName with the name of the combo box control, of course.

replace
the "n" value, within the parentheses, with the index value of the

column
you want to display. the combo box column index is zero-based, so the

first
column (counting from left to right) is 0, the second column is 1, the

third
column is 2, etc.

hth


"David Berg" wrote in message
...
I would like to expand on Mr/s. Frog's question. I also have cbo's

with
multiple columns. The column counts and widths are as suggested by Mr.
Steele. When I drop down the list box to display the list of values in

the
domain, all the columns in the cbo are displayed. However, after a

value
is
selected, only the first column is displayed. How do I display all

columns
after a value is chosen by the user? Thank you.

"Douglas J Steele" wrote:

Column Count: 2
Column Widths: 0";1"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"MJFrog" wrote in message
...
I have a simple combo box that is taking its row source from a

newly
created
table that has only two colums - the key (just a list of

continuous
numbers)
and a list of surnames.

No matter what settings I try I can only get the combo box to

display
the
numbers from the key, how do I get it to just show the surnames

from
column 2
of the table?

Can anyone help?









 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden Power of the Combo Box JethroUK© New Users 2 October 24th, 2005 09:18 AM
How do I set up a value based on another box's value in access? idontgetit Using Forms 14 August 10th, 2005 06:45 PM
combo question rob New Users 10 March 21st, 2005 02:05 PM
Design help, please SillySally Using Forms 27 March 6th, 2005 04:11 AM
Multi Columns in Combo Box Jenn General Discussion 3 February 16th, 2005 08:27 PM


All times are GMT +1. The time now is 06:09 PM.


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