I got my listbox control with the style property set to checkbox. Now I wanted to display those ticked one to the user when I receiving the earlier saved settings from the table in the database. So I done the following in my form module:
Do Until oRec.EOF
For iIndex = 0 To lstBrand.ListCount - 1
If oRec.Fields("brdBrandName") = .List(iIndex) Then
.Selected = True
iBrandIndex = iBrandIndex + 1
But when I run this I'm the getting the follwing error at the ".Selected = true" statement:
Argument not optional
Can someone tell me what do I doing wrong here? Do I need to include the ItemData property?
If so, how?