J
Jack
In the control source of a textbox, is there a way to refer to a column of a
combobox? For example:
=[CbxName].Column(2)
Thanks,
Jack
combobox? For example:
=[CbxName].Column(2)
Thanks,
Jack
Jack said:In the control source of a textbox, is there a way to refer to a column of a
combobox? For example:
=[CbxName].Column(2)
Marshall Barton said:Jack said:In the control source of a textbox, is there a way to refer to a column of a
combobox? For example:
=[CbxName].Column(2)
Exactly like that. Just note that the column number is zero
based.
Did you try it? If it didn't work, what happened.
Jack said:It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the
third column.
This is in a subform where the subform is continuous.
Jack
Marshall Barton said:Jack said:In the control source of a textbox, is there a way to refer to a column of a
combobox? For example:
=[CbxName].Column(2)
Exactly like that. Just note that the column number is zero
based.
Did you try it? If it didn't work, what happened.
It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the
third column.
This is in a subform where the subform is continuous.
Jack said:In the control source of a textbox, is there a way to refer to a column of a
combobox? For example:
=[CbxName].Column(2)
"Marshall Barton" wrote
Exactly like that. Just note that the column number is zero
based.
Did you try it? If it didn't work, what happened.
Marshall Barton said:#Name implies that you spelled the name of the combo box
incorrectly or left out the = sign.
However, this isn't going to do what you want in a
continuous (sub)form. All copies of the text box will
display the same value because there is only one combo box
control (the current record).
--
Marsh
MVP [MS Access]
It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the
third column.
This is in a subform where the subform is continuous.
Jack wrote:
In the control source of a textbox, is there a way to refer to a column of a
combobox? For example:
=[CbxName].Column(2)
"Marshall Barton" wrote
Exactly like that. Just note that the column number is zero
based.
Did you try it? If it didn't work, what happened.
Douglas said:Perhaps the problem is the square brackets around the combo box name.
Marshall Barton said:#Name implies that you spelled the name of the combo box
incorrectly or left out the = sign.
However, this isn't going to do what you want in a
continuous (sub)form. All copies of the text box will
display the same value because there is only one combo box
control (the current record).
--
Marsh
MVP [MS Access]
It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the
third column.
This is in a subform where the subform is continuous.
Jack wrote:
In the control source of a textbox, is there a way to refer to a column of a
combobox? For example:
=[CbxName].Column(2)
"Marshall Barton" wrote
Exactly like that. Just note that the column number is zero
based.
Did you try it? If it didn't work, what happened.
Duane Hookom said:A continuous form will correctly display the 3rd column for each different
record.
Make sure the name of the control is not also the name of a field.
--
Duane Hookom
MS Access MVP
Marshall Barton said:#Name implies that you spelled the name of the combo box
incorrectly or left out the = sign.
However, this isn't going to do what you want in a
continuous (sub)form. All copies of the text box will
display the same value because there is only one combo box
control (the current record).
--
Marsh
MVP [MS Access]
It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the
third column.
This is in a subform where the subform is continuous.
Jack wrote:
In the control source of a textbox, is there a way to refer to a column
of a
combobox? For example:
=[CbxName].Column(2)
"Marshall Barton" wrote
Exactly like that. Just note that the column number is zero
based.
Did you try it? If it didn't work, what happened.
Jack said:Thanks, Duane, for your response!
<<Make sure the name of the control is not also the name of a field.>>
Access defaults to naming a control the same as the name of the field. Why
does it have to be changed?
Jack
Duane Hookom said:A continuous form will correctly display the 3rd column for each
different
record.
Make sure the name of the control is not also the name of a field.
--
Duane Hookom
MS Access MVP
Marshall Barton said:#Name implies that you spelled the name of the combo box
incorrectly or left out the = sign.
However, this isn't going to do what you want in a
continuous (sub)form. All copies of the text box will
display the same value because there is only one combo box
control (the current record).
--
Marsh
MVP [MS Access]
Jack wrote:
It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the
third column.
This is in a subform where the subform is continuous.
Jack wrote:
In the control source of a textbox, is there a way to refer to a column
of a
combobox? For example:
=[CbxName].Column(2)
"Marshall Barton" wrote
Exactly like that. Just note that the column number is zero
based.
Did you try it? If it didn't work, what happened.