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 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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |