Hi Everyone,
I have my recordset declared as rs. I'm trying to run a progress bar which will show how many records the search has gone through. I don't have VB6 on this machine, so I was wondering if someone could just check my logic/syntax.
So to accomplish this I will do the following:
Open the Recordset
VB Code:
Dim iCsrNum as Integer 'to hold the total number of customers iCsrNum = rs.RecordsetCount ProgressBar1.Max = iCsrNum ProgressBar1.Value = 1
My question is, is there any built-in way to find the current record number, as opposed to creating a counter for each record? For example is there any easy way like?
VB Code:
Do Until rs.EOF ProgressBar1.Value = rs.CurrentRecordNum Loop
As opposed to this?
VB Code:
Dim iCurrentRecCount as Integer iCurrentRecCount = 0 Do Until rs.EOF iCurrentRecCount = iCurrentRecCount + 1 ProgressBar1.Value = iCurrentRecCount Loop
Does my question make sense?




Reply With Quote