Hello..!
i have an problem to connect a progress bar with listview object.P.bar working properly. bt i want to connect p.bar with ma sql database while m searching database.kindly help me where m i doin wrong..the code is below.
Private Sub cmdRFind_Click()
On Error Resume Next
Dim vLst As ListItem
LstV1.ListItems.Clear
ProgressBar1.Min = 0
ProgressBar1.Max = d.RecordCount
ProgressBar1.Value = 0
If d.BOF = True Then Exit Sub
d.MoveFirst
While Not d.EOF
If d.Fields(0) = txtRWise.Text Then
'--------------- TEXT BOX ------------------------
'==================================================
Set vLst = LstV1.ListItems.Add(, , LstV1.ListItems.Count)
vLst.SubItems(1) = d.Fields(0)
vLst.SubItems(2) = d.Fields(1)
vLst.SubItems(3) = d.Fields(2)
vLst.SubItems(7) = d.Fields(6)
LstV1.Refresh
End If
For I = 0 To d.RecordCount
' Do nothing, but wait
' To show up the progress bar proceeding
Next I
' Update the progress bar and percent label accordingly
ProgressBar1.Value = ProgressBar1.Value + 1
lblPercent.Caption = Int(ProgressBar1.Value * 100 / ProgressBar1.Max)
lblPercent.Refresh
d.MoveNext
Wend
LstV1.Refresh
Me.txtRWise.Text = ""
End Sub
plz help me ..