I have two list boxes and one text box. In general, I would like to set the control source of the text box as:
form.text1.controlsource = form.list1.column(0,i) & " - " &_ form.list1.column(0,i)
i is a variable determined by a loop.
If list1.column(0,1) = read and list2.column(0,1) = this, then my goal is for the textbox to read:
read - this
Now this is easily done if I set the control source manually by right-clicking on properties and setting the control source. However, I need to do it using code so that the variable i can be manipulated since the same row will not be displayed each time.
My only idea so far (that obviously didn't work) was to add more quotation marks. This is what I tried:
form.text1.controlsource = form.list1.column(0,i) & "" - "" &_ form.list1.column(0,i)
If anyone has any ideas, thanks in advance.
Justin
form.text1.controlsource = form.list1.column(0,i) & " - " &_ form.list1.column(0,i)
i is a variable determined by a loop.
If list1.column(0,1) = read and list2.column(0,1) = this, then my goal is for the textbox to read:
read - this
Now this is easily done if I set the control source manually by right-clicking on properties and setting the control source. However, I need to do it using code so that the variable i can be manipulated since the same row will not be displayed each time.
My only idea so far (that obviously didn't work) was to add more quotation marks. This is what I tried:
form.text1.controlsource = form.list1.column(0,i) & "" - "" &_ form.list1.column(0,i)
If anyone has any ideas, thanks in advance.
Justin