

When the sort is complete, you would reset the status bar by removing the text. For example, during a sort you might change the text to "Sorting.". You can also change the text that's displayed in the status bar by calling the SysCmd method with the acSysCmdSetStatus Action argument and the Text argument.
#STATUS BAR ACCESS VBA UPDATE#
For example, if you set the maximum value to 200 and then update the meter with a value of 100, the progress meter will be half-filled. When the Action argument is acSysCmdUpdateMeter, the SysCmd method uses the Value argument to calculate the percentage displayed by the meter. To update the meter to show the progress of the operation, call the SysCmd method with the acSysCmdUpdateMeter Action argument and the Value argument. When the Action argument is acSysCmdInitMeter, the Value argument is the maximum value of the meter, or 100 percent. To display a progress meter in the status bar, you must first call the SysCmd method with the acSysCmdInitMeter Action argument, and the Text and Value arguments. NOTE: When you specify the acSysCmdGetObjectState value for the Action parameter, you must specify the name of the database object.įor example, if you are building a custom wizard that creates a new form, you can use the SysCmd method to display a progress meter indicating the progress of your wizard as it constructs the form.īy calling the SysCmd method with the various progress meter actions, you can display a progress meter in the status bar for an operation that has a known duration or number of steps, and update it to indicate the progress of the operation. This argument is required when the Action argument is acSysCmdInitMeter this argument isn't valid for other Action argument values.

NOTE: When you specify the acSysCmdGetObjectState value for the Action parameter, you must specify the appropriate AcObjectType constant.Ī numeric expression that controls the display of the progress meter. This argument is required when the Action argument is acSysCmdInitMeter, acSysCmdUpdateMeter, or acSysCmdSetStatus this argument isn't valid for other Action argument values. The text to be displayed left-aligned in the status bar. Otherwise, Access generates a run-time error. The SysCmd method returns a Null if these actions are successful. This set of constants applies to a progress meter. Parameters NameĪn AcSysCmdAction constant that identifies the type of action to take. SysCmd ( Action, Argument2, Argument3)Įxpression A variable that represents an Application object. 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 (to indicate whether the object is open, is a new object, or has been changed but not saved).
