Link to home
Start Free TrialLog in
Avatar of k4y
k4y

asked on

Ms Access-2003 progress bar

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
Avatar of jppinto
jppinto
Flag of Portugal image

Please take a look at this article:

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

jppinto
ASKER CERTIFIED SOLUTION
Avatar of jppinto
jppinto
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of k4y
k4y

ASKER

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

SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of k4y

ASKER

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
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
Avatar of k4y

ASKER

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
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.
Avatar of k4y

ASKER

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

 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.
Avatar of k4y

ASKER

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,