K
Ken Hutson
Hi Group,
I am reading that the ListIndex property is read only on a form. However,
an example shows this property being set as well. Here is this example.
Which is it?
Thanks.
Ken Hutson
San Antonio, TX
Example
To return the value of the ListIndex property, you can use the following:
Dim l As Long
l = Forms(formname).Controls(controlname).ListIndex
To set the ListIndex property value, you can use the following:
Forms(formname).Controls(controlname).ListIndex = index
Where formname and controlname are the names of the form and list box or
combo box control, respectively, expressed as String values, and index is
the index value of the item.
I am reading that the ListIndex property is read only on a form. However,
an example shows this property being set as well. Here is this example.
Which is it?
Thanks.
Ken Hutson
San Antonio, TX
Example
To return the value of the ListIndex property, you can use the following:
Dim l As Long
l = Forms(formname).Controls(controlname).ListIndex
To set the ListIndex property value, you can use the following:
Forms(formname).Controls(controlname).ListIndex = index
Where formname and controlname are the names of the form and list box or
combo box control, respectively, expressed as String values, and index is
the index value of the item.