I am trying to read values from textbox controls and combobox controls on a form.
Reading the values from textbox controls is working fine but I cannot read from the 3 combo boxes.
Here is some simplified code of what I am trying to do.
[code=vb]
for intCounter = 1 to 3
dblPrincipal = Me.Controls("tx tPrincipal" & intCounter).Tex t
intType = Me.Controls("cb oM" & intCounter).Sel ectedIndex
next intCounter
[/code]
The intType= statement (line 3) is where the problem occurs. Error message as in my Question Title. It appears I cannot reference the selectedindex property in the method.
Any ideas how I can do this for 3 combo boxes on my form.
cheers,
Reading the values from textbox controls is working fine but I cannot read from the 3 combo boxes.
Here is some simplified code of what I am trying to do.
[code=vb]
for intCounter = 1 to 3
dblPrincipal = Me.Controls("tx tPrincipal" & intCounter).Tex t
intType = Me.Controls("cb oM" & intCounter).Sel ectedIndex
next intCounter
[/code]
The intType= statement (line 3) is where the problem occurs. Error message as in my Question Title. It appears I cannot reference the selectedindex property in the method.
Any ideas how I can do this for 3 combo boxes on my form.
cheers,
Comment