antonio.manoj.derose
Registered User.
- Local time
- Today, 21:41
- Joined
- Jul 4, 2013
- Messages
- 62
'this is my progress bar, coding I am able to see the code is working
'when I put a bullet point
'issue is the progress bar is not visualizing
Option Compare Database
Option Explicit
Public Sub ProgressMeter100()
Dim MyDB As DAO.Database, MyTable As DAO.Recordset
Dim Count As Long
Dim Progress_Amount As Integer
Set MyDB = CurrentDb()
Set MyTable = MyDB.OpenRecordset("tblpayments")
' Move to last record of the table to get the total number of records.
MyTable.MoveLast
Count = MyTable.RecordCount
' Move back to first record.
MyTable.MoveFirst
' Initialize the progress meter.
SysCmd acSysCmdInitMeter, "Reading Data...", Count
' Enumerate through all the records.
For Progress_Amount = 1 To Count
' Update the progress meter.
SysCmd acSysCmdUpdateMeter, Progress_Amount
'Print the contact name and number of orders in the Immediate window.
'Debug.Print Progress_Amount 'MyTable![ContactName]; _
'DCount("[OrderID]", "Orders", "[CustomerID]='" & MyTable![CustomerID] & "'")
' Go to the next record.
MyTable.MoveNext
Next Progress_Amount
' Remove the progress meter.
SysCmd acSysCmdRemoveMeter
End Sub
'when I put a bullet point
'issue is the progress bar is not visualizing
Option Compare Database
Option Explicit
Public Sub ProgressMeter100()
Dim MyDB As DAO.Database, MyTable As DAO.Recordset
Dim Count As Long
Dim Progress_Amount As Integer
Set MyDB = CurrentDb()
Set MyTable = MyDB.OpenRecordset("tblpayments")
' Move to last record of the table to get the total number of records.
MyTable.MoveLast
Count = MyTable.RecordCount
' Move back to first record.
MyTable.MoveFirst
' Initialize the progress meter.
SysCmd acSysCmdInitMeter, "Reading Data...", Count
' Enumerate through all the records.
For Progress_Amount = 1 To Count
' Update the progress meter.
SysCmd acSysCmdUpdateMeter, Progress_Amount
'Print the contact name and number of orders in the Immediate window.
'Debug.Print Progress_Amount 'MyTable![ContactName]; _
'DCount("[OrderID]", "Orders", "[CustomerID]='" & MyTable![CustomerID] & "'")
' Go to the next record.
MyTable.MoveNext
Next Progress_Amount
' Remove the progress meter.
SysCmd acSysCmdRemoveMeter
End Sub