Solved

Ms Access-2003 progress bar

Posted on 2011-03-24
11
1,703 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

911 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

22 Experts available now in Live!

Get 1:1 Help Now