R
Robbie Baquiran
Hi All:
Everyone knows the value of a combo box is set to the value of which the
control is bound to. I would like to go a little bit further and use values
that are hidden within it's recordsource.
I know that I can "me.cmbControl.column(x,y)" to return the values in the
various columns within the control, is there an easy way to select the value
of another column of the "Selected Item" in the recordsource? My current
thought is that I would have to itterate on the bound column in order to
find the row of which the record resides ... so that I can call up the value
via .column(x,y). I hope that makes sense.. here's an quick and dirty
example.
[ cmbControl ]
1 | "Dan" | -1
2 | "Tom" | 0
3 | "Bob" | -1
4 | "Joe" | 0
Column one is bound, only column two is visible. If someone selects "Bob",
then me.cmbControl.value = 3, while in order for me to get the value for
column three - I would need to evaluate me.cmbControl.column(2,2).
Is there a better way to find the value of the column three for the selected
item rather than looping around column one untill it matches the value of
cmbControl, figuring out it's row - then fetching the value of column 3?
Any input is appreciated
TIA!!
Everyone knows the value of a combo box is set to the value of which the
control is bound to. I would like to go a little bit further and use values
that are hidden within it's recordsource.
I know that I can "me.cmbControl.column(x,y)" to return the values in the
various columns within the control, is there an easy way to select the value
of another column of the "Selected Item" in the recordsource? My current
thought is that I would have to itterate on the bound column in order to
find the row of which the record resides ... so that I can call up the value
via .column(x,y). I hope that makes sense.. here's an quick and dirty
example.
[ cmbControl ]
1 | "Dan" | -1
2 | "Tom" | 0
3 | "Bob" | -1
4 | "Joe" | 0
Column one is bound, only column two is visible. If someone selects "Bob",
then me.cmbControl.value = 3, while in order for me to get the value for
column three - I would need to evaluate me.cmbControl.column(2,2).
Is there a better way to find the value of the column three for the selected
item rather than looping around column one untill it matches the value of
cmbControl, figuring out it's row - then fetching the value of column 3?
Any input is appreciated
TIA!!