Progress Bar not showing up (1 Viewer)

antonio.manoj.derose

Registered User.
Local time
Tomorrow, 01:32
Joined
Jul 4, 2013
Messages
62
G'day G'day everybody, Please be noted that I am unable to print the progress bar of the syscmd, I have tried checning the progressbar too under the startup.

When I put a debug point, it goes to that area and loops through it, by printing it in the immediate window, debug.print.

I have even put a msgbox, to see whether it is popping up, yes it does.

I have tried Application.syscmd and syscmd, here I am gonna paste the coding.

Thanks,

Antonio

Option Compare Database
Option Explicit
Public Sub ProgressMeterModule()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim lngCurrRow As Long ' Current row number
Dim lngTotalRows As Long ' Number of total rows in the table
' Open the database and recordset objects
Set db = CurrentDb
Set rs = db.OpenRecordset("tblpayments", dbOpenSnapshot)
' If no rows in input table, exit sub/function
If rs.BOF And rs.EOF Then
rs.Close
db.Close
Exit Sub
End If
' Position at the last row in the recordset
rs.MoveLast
' Obtain the total number of rows
lngTotalRows = rs.RecordCount
' Initialize the system meter
Application.SysCmd acSysCmdInitMeter, "Loading entries", lngTotalRows
' Position at the first row in the recordset - you definately
' want to be sure to do this after positioning at the last row
' a couple of steps back.
rs.MoveFirst
' Initialize the current row counter
lngCurrRow = 1
' For each row in the recordset,
While Not rs.EOF
' Update the system meter
SysCmd acSysCmdUpdateMeter, lngCurrRow
If (lngCurrRow = 10) Then
MsgBox "Antonio why aint the Progress Meter working"
End If

' Position at the next row in the recordset
rs.MoveNext
' Increment the current row counter
lngCurrRow = lngCurrRow + 1
Wend
' Clear the status line
SysCmd acSysCmdClearStatus
' Close the recordset and database objects
rs.Close
db.Close

End Sub
 

JHB

Have been here a while
Local time
Today, 17:32
Joined
Jun 17, 2012
Messages
7,732
Have you set the option for the "Current database" to show the status bar, ("Display Status bar")?
Choose "File"->"Options"->"Current Database", then mark the "Display Status bar"
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 16:32
Joined
Sep 12, 2006
Messages
15,658
how many rows are there to check. if there are less than 10, i imagine the progress bar is done and gone before you even notice it is there.

are you looking in the right place for the status bar. The one in A2003 was easy to see, and long (20 steps) - but the one now is on the other side of the screen, and harder to spot.


by the way

SysCmd acSysCmdRemoveMeter

is better for removing the meter when done.


maybe the clearstatus line you are using is causing the problem
 

antonio.manoj.derose

Registered User.
Local time
Tomorrow, 01:32
Joined
Jul 4, 2013
Messages
62
Hi gemma-the-husky / JHB and all,

@JHB - yes I have checked the display status bar and still it does not work, before posting the first post itself it had been checked and not working.

@gemma-the-husky - No.of records had been 50000, and I have tried the using the SysCmd acSysCmdRemoveMeter, but still no joy at my end.

Do I have to drag any control somethinng like a progressbar in ActiveXControl to get this thing up and running, I have spent nearly 3 days on this, and it is very frustrating.

Thanks,

Antnoio.
 

JHB

Have been here a while
Local time
Today, 17:32
Joined
Jun 17, 2012
Messages
7,732
Hi gemma-the-husky / JHB and all,

@JHB - yes I have checked the display status bar and still it does not work, before posting the first post itself it had been checked and not working.

Thanks,

Antnoio.
When I run your code on a table of mine, the status bar display, (see attached picture, I have attached the database also).
 

Attachments

  • StatusBar.zip
    746.5 KB · Views: 233

JHB

Have been here a while
Local time
Today, 17:32
Joined
Jun 17, 2012
Messages
7,732
Do I have to drag any control somethinng like a progressbar in ActiveXControl to get this thing up and running, I have spent nearly 3 days on this, and it is very frustrating.

Thanks,

Antnoio.
No - post a small sample database if you still can't get to work.
 

Users who are viewing this thread

Top Bottom