Solved

Progress indicator while file import is running

Posted on 2014-09-19
6
196 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

929 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now