Solved

Progress indicator while file import is running

Posted on 2014-09-19
6
194 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

706 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

19 Experts available now in Live!

Get 1:1 Help Now