sir i want to show only distinct row should come in list box.
any help would be greately appreciated.
Dim con As adodb.Connection
Dim rs As adodb.Recordset
Dim i As Integer
Dim strReq As String * 10
Dim strName As String * 20
Dim strJob As String * 10
Dim strDate As String * 10
Dim x As Integer
Private Sub Form_Load()
Set con = New Connection
con.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=\asfserver\itp$\Product_tabletest.mdb")
Set rs = New adodb.Recordset
rs.Open "SELECT * from mr ", con, adOpenDynamic, adLockOptimistic
' List1.AddItem (rs!req_no & vbNullString & " " & rs!emp_name & " " & rs!job_no & " " & rs!mr_date)
While (Not (rs.EOF))
strReq = rs!req_no & ""
strName = rs!emp_name & ""
strJob = rs!job_no & ""
strDate = rs!mr_date & ""
List1.Font = "Courier New"
List1.AddItem strReq & " " & strName & " " & strJob & " " & strDate
rs.MoveNext
Wend
End Sub
list.zip