
Shall the value (for updating the Progress Bar) be passed to either Argument 2 or Argument3? Which one is correct?įrankly, I am getting confused about the said conflict. It seems there is a conflict of the syntax "SysCmd acSysCmdUpdateMeter".
STATUS BAR ACCESS VBA CODE
If I mark the said code line as comment, everything works properly. However, I tried to run the same code in another computer, it cannot work. In the example given by Microsoft, the value is passed to Argument2 (not Argument3) and it worked in practice. At the second time, it caused the same error (as mentioned above) at the same code line. It only worked at the first time when it came into the loop. I tried to changed it to " SysCmd acSysCmdUpdateMeter, "Running.", nRecord" (which means the value was passed to Argument3 instead of Argument2). DoCmd.ShowToolbar 'Ribbon', acToolbarYes. However, when I ran this code in my home computer (also using MS Office 2016), it caused an error numbered 7952 "You made an illegal function call" at the code line "SysCmd acSysCmdUpdateMeter, nRecord". This way (i) i can easy hide the default ribbon, (ii) i can create my own custom ribbons for my applications (for printing, exporting. In practice, when I ran the above code in my firm computer (using MS Office 2016), I worked properly and there is no problem. Create a progress bar in Excel using VBA (Visual Basic for Applications). 'SysCmd acSysCmdInitMeter, "Reading Data.", nTotalRecord I am trying to use a shared Office 365 Outlook contact list in an Access. Here is the code that I was running: nTotalRecord = Rs.RecordCount

NOTE: When you specify the acSysCmdGetObjectState value for the Action parameter, you must specify the name of the database object. 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.Īrgument3 - Optional - Variant <- A 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.

SysCmd acSysCmdUpdateMeter, Progress_Amount '<- one comma, or the value is passed to argument 2Īccording to this link ( ), I found that the syntax for "SysCmd acSysCmdUpdateMeter" is described as follows:Įxpression.SysCmd (Action, Argument2, Argument3)Īrgument2 - Optional - Variant <- The text to be displayed left-aligned in the status bar. SysCmd acSysCmdInitMeter, "Reading Data.", Count We and our partners store and/or access information on a device, such as unique IDs in cookies to process personal data. Via this link ( ), the progress bar in MS Access can be used as follows: ' Initialize the progress meter. Recently, I have found a conflict of syntax in VBA code (for progress bar used in MS Access) as posted via Microsoft websites.
