Solved

Ms Access-2003 progress bar

Posted on 2011-03-24
11
1,734 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
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.

 
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
 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

821 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