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 |
#11
|
|||
|
|||
Combo Box Columns
try
[forms]![formname].[cboBoxname].[Column](1) hth "David Berg" wrote in message ... 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? |
#12
|
|||
|
|||
Combo Box Columns
I tried that, too. But the SQL fails because it thinks
'[forms]![formname].[cboBoxname].[Column]' is a function, whose parameter is (1), and, of course, there is no such function. I successfully worked around the problem using the concatenation operation described below. Thanks again, Tina, for your assistance. - David "tina" wrote: try [forms]![formname].[cboBoxname].[Column](1) hth "David Berg" wrote in message ... 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? |
#13
|
|||
|
|||
Combo Box Columns
you're welcome, David, glad you figured out a way to make it work for you.
"David Berg" wrote in message ... I tried that, too. But the SQL fails because it thinks '[forms]![formname].[cboBoxname].[Column]' is a function, whose parameter is (1), and, of course, there is no such function. I successfully worked around the problem using the concatenation operation described below. Thanks again, Tina, for your assistance. - David "tina" wrote: try [forms]![formname].[cboBoxname].[Column](1) hth "David Berg" wrote in message ... 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? |
#14
|
|||
|
|||
Combo Box Columns
THANK YOU, THANK YOU, THANK YOU. I have been all over this forum trying to
get this thing right. Each time I set up a column(n), my system would crash. I began doing one at a time and saving as I went along and it works PERFECTLY. Thank you so much. "Douglas J. Steele" wrote: 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? |
|
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 03:05 PM |
Design help, please | SillySally | Using Forms | 27 | March 6th, 2005 05:11 AM |
Multi Columns in Combo Box | Jenn | General Discussion | 3 | February 16th, 2005 09:27 PM |