Hi
I have the follwoing code which should populate a 2 Column listbox
I get the following error "Compile error. method or data member not found" on .clear statement in the code.
Any idea whats wrong with the code?
The list box is created in MS Access 2003.
Regards
Mo
I have the follwoing code which should populate a 2 Column listbox
Code:
Private Sub Form_Open(Cancel As Integer)
strSQL = "SELECT tbl_Computer_Main_Applications.Computer_Main_Application_ID, tbl_Computer_Main_Applications.Computer_Main_App_Name, tbl_Computer_Main_Applications.Computer_Main_App_Version " & _
"FROM tbl_Computer_Main_Applications;"
Set rsOpened = OpenTable(strSQL)
rsOpened.MoveFirst
i = 0
With Me.lstAppAvailable
.Clear
Do
.AddItem
'Add the Item to the Listbox
.list(i, 0) = rsOpened.Fields("Computer_Main_Application_ID")
.list(i, 1) = rsOpened.Fields("Computer_Main_App_Name") & " " & rsOpened.Fields("Computer_Main_App_Version")
i = i + 1
rsOpened.MoveNext
Loop Until rsOpened.EOF
End With
rsOpened.Close
End Sub
I get the following error "Compile error. method or data member not found" on .clear statement in the code.
Any idea whats wrong with the code?
The list box is created in MS Access 2003.
Regards
Mo