G
Guest
Hi there,
I want my user to be able so see the processing of records as my db runs a
query. They are working with large recordsets, up to 1,000,000 records.
Now, the query bar moves very slowly and not at all for minutes at a time.
What I want is for the user to see, "processing 2,154 of 500,000 etc with the
first number constantly increasing.
I have tried the following:
Dim conn As ADODB.Connection
Set conn = CurrentProject.Connection
Dim Frst As New ADODB.Recordset
Dim TotalRecords As Long
Dim RecordNum As Long
Dim Feedback As String
RecordNum = 0
Frst.Open "Select * From ClientData", conn, adOpenKeyset, acLockOptimistic
TotalRecords = Frst.RecordCount
Do Until Frst.EOF
RecordNum = RecordNum + 1
Feedback = "Processing " & RecordNum & " of " & TotalRecords
SysCmd acSysCmdSetStatus, Feedback
Frst.MoveNext
Loop
Frst.Close
Set Frst = Nothing
This seems to work, but my status bar is unreadable things are going so
fast. I've tried doing this as well:
Me.txtTotRecs.Text = CStr(TotalRecords)
with another text box showing the total number of records in the set which
is populated in the on open event of the form. I also tried this with a
label's caption property, but it won't show anything until after all is done
and the last record is reached.
Any suggestions?
Thanks!
I want my user to be able so see the processing of records as my db runs a
query. They are working with large recordsets, up to 1,000,000 records.
Now, the query bar moves very slowly and not at all for minutes at a time.
What I want is for the user to see, "processing 2,154 of 500,000 etc with the
first number constantly increasing.
I have tried the following:
Dim conn As ADODB.Connection
Set conn = CurrentProject.Connection
Dim Frst As New ADODB.Recordset
Dim TotalRecords As Long
Dim RecordNum As Long
Dim Feedback As String
RecordNum = 0
Frst.Open "Select * From ClientData", conn, adOpenKeyset, acLockOptimistic
TotalRecords = Frst.RecordCount
Do Until Frst.EOF
RecordNum = RecordNum + 1
Feedback = "Processing " & RecordNum & " of " & TotalRecords
SysCmd acSysCmdSetStatus, Feedback
Frst.MoveNext
Loop
Frst.Close
Set Frst = Nothing
This seems to work, but my status bar is unreadable things are going so
fast. I've tried doing this as well:
Me.txtTotRecs.Text = CStr(TotalRecords)
with another text box showing the total number of records in the set which
is populated in the on open event of the form. I also tried this with a
label's caption property, but it won't show anything until after all is done
and the last record is reached.
Any suggestions?
Thanks!