Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

Show record processing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johnny Bright - 05 Jun 2007 22:38 GMT
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!
Signature

www.brightfuture.ca/bright
My email address can be found on my site.

ruralguy - 05 Jun 2007 23:29 GMT
Screen updating is a very low priority task in Access.  Toss in some DoEvents
to give the other tasks some computer time.

>Hi there,
>
[quoted text clipped - 41 lines]
>
>Thanks!

Signature

HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.