?
Solved

MS Access Report progress bar

Posted on 2007-07-25
3
Medium Priority
?
432 Views
Last Modified: 2008-01-09
Is it possible to have a progress bar for a report?

The report takes about 20 seconds to run, I was wondering if there is a way to have a popup to display working, then close until the report populates.
0
Comment
Question by:jumpy262000
  • 3
3 Comments
 
LVL 75
ID: 19565769
You could use the SysCmd Method  ... InitMeter  / Remove Meter  functions ... and display info in the Status bar at the bottom of the App window.

mx

0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 19565784
more:

SysCmd Method
See AlsoApplies ToExampleSpecificsYou can use the SysCmd method to, display a progress meter or optional specified text in the status bar, return information about Microsoft Access and its associated files, or return the state of a specified database object (database objects: An Access database contains objects such as tables, queries, forms, reports, pages, macros, and modules. An Access project contains objects such as forms, reports, pages, macros, and modules.) (to indicate whether the object is open, is a new object, or has been changed but not saved). Variant.

expression.SysCmd(Action, Argument2, Argument3)
expression    Required. An expression that returns one of the objects in the Applies To list.

Action   Required AcSysCmdAction. One of the following intrinsic constants (intrinsic constant: A constant that is supplied by Access, VBA, ADO, or DAO. These constants are available in the Object Browser by clicking <globals> in each of these libraries.) identifying the type of action to take. The following set of constants applies to a progress meter. The SysCmd method returns a Null if these actions are successful. Otherwise, Microsoft Access generates a run-time error (run-time error: An error that can be detected only when an application is running.).

AcSysCmdAction can be one of these AcSysCmdAction constants.
acSysCmdAccessDir. Returns the name of the directory where Msaccess.exe is located.
acSysCmdAccessVer. Returns the version number of Microsoft Access.
acSysCmdClearHelpTopic
acSysCmdClearStatus. The following constant provides information on the state of a database object.
acSysCmdGetObjectState. Returns the state of the specified database object. You must specify argument1 and argument2 when you use this action value.
acSysCmdGetWorkgroupFile. Returns the path to the workgroup file (System.mdw).
acSysCmdIniFile. Returns the name of the .ini file associated with Microsoft Access.
acSysCmdInitMeter. Initializes the progress meter. You must specify the argument1 and argument2 arguments when you use this action.
acSysCmdProfile. Returns the /profile setting specified by the user when starting Microsoft Access from the command line.
acSysCmdRemoveMeter. Removes the progress meter.
acSysCmdRuntime. Returns True (1) if a run-time version of Microsoft Access is running.
acSysCmdSetStatus. Sets the status bar text to the text argument.
acSysCmdUpdateMeter. Updates the progress meter with the specified value. You must specify the text argument when you use this action.
----
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 19566650
It's a little tricky to tell just when the report is populated.

You *might* ... be able to set the report record source in the Report OnOpen event ... prior to which setting the SysCmd meter ...  then, after setting the recordsource, reset the meter ...

Private Sub Report_Open(Cancel As Integer)
    Call SysCmd (<init meter here>)
    Me.Recordsource = "SomeQueryOrTable"
    Call SysCmd (<reset the meter here>)
End Sub

I'm using generic syntax for the SysCmd ...

mx
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

862 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