Solved

Progress indicator while file import is running

Posted on 2014-09-19
6
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 85
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 50

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 85

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: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

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.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

688 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