antonio.manoj.derose
Registered User.
- Local time
- Today, 10:00
- 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
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