Solved

Ms Access-2003 progress bar

Posted on 2011-03-24
11
1,690 Views
Last Modified: 2013-11-29
Hi,

I have a ms access database with the linked table from different database, the main database with all the tables are in remote computer and we connect to this database using VPN connection.

Now on the local pc the database opens the form with the list control query the data from linked tables, which takes some time to open, Their are not many records to display. I want to make the progress bar showing that its working and not hung.

I have made the progress bar while reading the data from the table and its works good, but its does not appear while opening the database.

any suggestion
0
Comment
Question by:k4y
  • 5
  • 4
  • 2
11 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 35205846
Please take a look at this article:

http://www.pyeung.com/pages/microsoft/office/access/progressbar.html

jppinto
0
 
LVL 33

Accepted Solution

by:
jppinto earned 250 total points
ID: 35205855
0
 

Author Comment

by:k4y
ID: 35205904
Hi ippinto

This is when its start reading data from the query, I have this done nicely, What i am looking for is to bring the progress bar while my link tables are getting refreshed from remote table.

What happens is when I open the database it takes a while to bring the form up. once the form is open and active then this progress bar work good

0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 35206023

  Maybe a timed one or one that is simply continuious to show that something is happening?

  Here's a sample DB with bars like that.

JimD.
ProgressBar.zip
0
 

Author Comment

by:k4y
ID: 35206389
Hi JDettman

The progBarContinuose is something i am looking for, but as soon as i replace the message box event to open my form the progress bar does not work

any suggestion
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 57
ID: 35206668
1. Take frmProgBarContinuous from the sample and place it in your DB.
2. Create a startup form and call this either from the Autoexec macro or by specifying it as the startup from for the DB.
3.  In that forms OnOpen event, place the following code (which is from frmProgBarContinuousDemo)

    Dim pb As New Form_frmProgBarContinuous


    pb.SetMessage "Setting up application..."
    pb.SetCaption "Performing startup tasks"
       
    pb.SetBarUpdateFrequency 0.1
    pb.SetBarVisible True
    pb.Startbar
   
    ' At this point, link your tables, open menu, etc.  What ever you need to get your app going
   
    pb.Stopbar
    pb.SetBarPercent 100
    pb.SetMessage "Done!"
   
    Set pb = Nothing

    Cancel = True
0
 

Author Comment

by:k4y
ID: 35206794
Hi JDettman

This is what exactly I have done, I have debug the steps and when opening new form its stuck for while and do not show any progress until that form is active

I need to progress bar between the event where we call the form to open and till the form is open and active


Thank you
0
 
LVL 57
ID: 35207300
Can you setup a small sample DB with what you have done and upload it?  I do not understand why it is not working.

frmProgBarContinuous contains a timer, which is what updates the bar.  It should run regardless of what is going on in other forms.

JimD.
0
 

Author Comment

by:k4y
ID: 35207721
HI

I had the list control with the query in rowsource, I have remove the query from here and now form opens instantly

I have added new commend button called "Get Data" which will run the query and fill the data on list control

Dim squery As String
squery = "SELECT CheckInvoices.Account_No, CheckInvoices.Company_Name, CheckInvoices.Job_Number, CheckInvoices.DeliveryNo, CheckInvoices.DeliveryDate, CheckInvoices.QtyShip, CheckInvoices.SageNominalCode, CheckInvoices.Prod1Cost, CheckInvoices.TotalLineCostApplied FROM CheckInvoices ORDER BY [DeliveryNo]; "

Dim pb As New Form_frmProgBarContinuous
    pb.SetMessage "Message with bar and caption, which will repeat..."
    pb.SetCaption "Physical inventory roll"

    pb.SetBarUpdateFrequency 0.1
    pb.SetBarVisible True
    pb.Startbar

List4.RowSource = squery

 pb.Stopbar
    pb.SetBarPercent 100
    pb.SetMessage "Done!"

    Set pb = Nothing

end sub

still i have see the progress bar form but no progress going thru

in the above example CheckInvoices is the query name in access database.

all the tables are linked table from the remote computer connected using VPN

see if this information helps you to diagnose my issue

Thank you
0
 
LVL 57
ID: 35208913

 Wee you got me.  I have known access to suspend execution in some cases, so that is probably what is happening.

  Is the list box your only problem?  If so, you can fill it programatically with a call back function and thus retain control.  Then you'd be able to put up a regular progress bar while you fill up the list.

JimD.
0
 

Author Comment

by:k4y
ID: 35258827
Thank you guys

I guess their is no work round for this connection issue. I have tried this several ways but did not success. Access application is not responding when I open the query from query editor or from VBA code using  DAO or ADODB connection,

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

757 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