Solved

Progress indicator while file import is running

Posted on 2014-09-19
6
197 Views
Last Modified: 2014-09-19
I import a text file into my Access 2010 database. It takes a few minutes and although the hourglass displays, it will be nice to display a progress value in a textbox on the import form while importing.

If I imported per individual records, I could increment some value between records to display the progress. However I use DoCmd.TransferText like in

DoCmd.TransferText acImportDelim, "CFE", CFEtblToImportTo, "C:\MMI\txtFiles Originals\" & CFEFileToImport & ".txt", True 

Open in new window


I can't see how to put an incrementer in there.

I know that it takes about two minutes to import and would like to display on my form how much time is left or something like that.

Is there a way?
0
Comment
Question by:Fritz Paul
6 Comments
 
LVL 84
ID: 40332252
There's really no way to accurately estimate how long an import will take, but if you want to show a progress bar it's pretty straight forward. You can use SysCmd to show the progress bar at the bottom of your form, but users often overlook that. Or, you can use a couple of Box controls with different colors to show a "progress" bar. For information on that, see this question: http://www.experts-exchange.com/Database/MS_Access/Q_28446429.html
0
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 40332266
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40332280
> However I use DoCmd.TransferText ...

Then it is not possible. Access is single-threaded, thus it can only handle one operation at any time and that is your TransferText operation.

The question referred to above ran several TransferText, then you can move a status bar in between these.

/gustav
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:Fritz Paul
ID: 40332290
Hi Scott,

Thanks for the link.

However do you understand from that that it will work for single processes? Under point 4. the article states "Frm_Status provides you with the ability to provide process status for a single process, or for imbedded processes. " Have you tried it? I am under the same impression as Gustav above.

I will ask Dale Faye (the author) and will give feedback here.

Fritz
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40332328
As I stated in my original comment, you cannot accurately determine when that process starts or stops, or where it's at. So you really cannot use an accurate progress bar, but you can use one that would count down those two minutes, by using the Form's Timer event. It would be klunky, and somewhat pointless, since the progress bar has no reflection on what's actually happening.

You can ask Dale if you like, but the answer is going to be the same ...
0
 

Author Closing Comment

by:Fritz Paul
ID: 40332827
The timer is what I needed.
Thanks it not about accuracy, it's about patience. If the user sees the countdown she feels something is happening (which usually is) and if it is not finished after 2 minutes, I give her a message that something went wrong and she must contact me. Otherwise the get bored and give me grief.
In the mean time Dale also replied on my query to him.
See http://www.experts-exchange.com/Database/MS_Access/Q_28446429.html#a40332673. I think his advice will be quite accurate, but I believe it will be slower.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question