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:
  1. Dim iCsrNum as Integer 'to hold the total number of customers
  2. iCsrNum = rs.RecordsetCount
  3. ProgressBar1.Max = iCsrNum
  4. 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:
  1. Do Until rs.EOF
  2. ProgressBar1.Value = rs.CurrentRecordNum
  3. Loop

As opposed to this?
VB Code:
  1. Dim iCurrentRecCount as Integer
  2. iCurrentRecCount = 0
  3. Do Until rs.EOF
  4. iCurrentRecCount = iCurrentRecCount + 1
  5. ProgressBar1.Value = iCurrentRecCount
  6. Loop

Does my question make sense?