Hi All,
My form is connected to Access db and extracts only 8 column details from a big table and display in a listbox. Everything is working fine.
How to show these particular column headers in listbox? Below is my code -
Set rs = New ADODB.Recordset
rs.Open "SELECT Emp_ID,Name,Facility_City_Role,BCM_Role,Designation,Cell_No,vNet,DL_Cog_All FROM DL_Mapping where Region in (" & Rglist & ") and Country in (" & CList & ") and City in (" & CityList & ") and Facility in (" & FacList & ") and Support_Function in (" & SFList & ")", Con, 1, 2
i = 0
Do While Not rs.EOF
ListBox1.AddItem rs.Fields("Emp_ID")
ListBox1.List(i, 1) = rs.Fields("Name")
ListBox1.List(i, 2) = rs.Fields("Facility_City_Role")
ListBox1.List(i, 3) = rs.Fields("BCM_Role")
ListBox1.List(i, 4) = rs.Fields("Designation")
ListBox1.List(i, 5) = rs.Fields("Cell_No")
ListBox1.List(i, 6) = rs.Fields("vNet")
ListBox1.List(i, 7) = rs.Fields("DL_Cog_All")
rs.MoveNext
i = i + 1
Loop
End If
Bookmarks