J
Johnny Bright
Hi there,
What I want to do is show my users that something is happening when they are
processing large numbers of records, upwards of 1,000,000 at times so they
can see that something is going on.
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,
adLockOptimistic
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 sort of works in the sense that the status bar is changing but it
changes so fast, it's unreadable.
I have tried creating a label or a text box such as:
me.lblTotal.caption=RecordNum
If I do this in the forms open event with my Total Records variable, I can
get this number but I need it to show which record the db is working on. Is
this even possible or are there any other suggestions?
Thanks!
John
What I want to do is show my users that something is happening when they are
processing large numbers of records, upwards of 1,000,000 at times so they
can see that something is going on.
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,
adLockOptimistic
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 sort of works in the sense that the status bar is changing but it
changes so fast, it's unreadable.
I have tried creating a label or a text box such as:
me.lblTotal.caption=RecordNum
If I do this in the forms open event with my Total Records variable, I can
get this number but I need it to show which record the db is working on. Is
this even possible or are there any other suggestions?
Thanks!
John