Hi,
I am loading data into a listcheckbox at form load.
I want to make sure tht all the checkboxes in the listbox are check how do I do this
Sub PopulateListBox ()
Dim strSQL As String
Dim rsRoute As Dao.Recordset
Dim temp As Long
strSQL = "SELECT Distinct(Item) FROM ItemsInOrder;"
Set rsRoute = gdbFML.OpenReco rdset(strSQL, dbOpenDynaset)
i = 0
If Not rsRoute.EOF Then
rsRoute.MoveFir st
Do While Not rsRoute.EOF
temp = rsRoute!item
'MsgBox temp
List1.AddItem temp, i
rsRoute.MoveNex t
i = i + 1
Loop
Else
MsgBox "No Data available"
Unload Me
End If
End Sub
This is my subroutine which populates the listbox
Thanx in advance
I am loading data into a listcheckbox at form load.
I want to make sure tht all the checkboxes in the listbox are check how do I do this
Sub PopulateListBox ()
Dim strSQL As String
Dim rsRoute As Dao.Recordset
Dim temp As Long
strSQL = "SELECT Distinct(Item) FROM ItemsInOrder;"
Set rsRoute = gdbFML.OpenReco rdset(strSQL, dbOpenDynaset)
i = 0
If Not rsRoute.EOF Then
rsRoute.MoveFir st
Do While Not rsRoute.EOF
temp = rsRoute!item
'MsgBox temp
List1.AddItem temp, i
rsRoute.MoveNex t
i = i + 1
Loop
Else
MsgBox "No Data available"
Unload Me
End If
End Sub
This is my subroutine which populates the listbox
Thanx in advance
Comment