Share via


Scripting with the Workflow Toolbar

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Script can be used to customize your workflow application. For example, by default, the Microsoft® Office Developer Workflow Toolbar control makes sure users set the workflow event before they can edit the fields and save the record. If you want to make it possible for fields to be edited before**the workflow event is set, you can program the update to the recordset to be done in the event script. Alternatively, in another example, if the toolbar control is located on a summary data access page showing multiple rows, you can use an event to navigate to a detail page for data entry.

To add script to the Workflow Toolbar control

  1. In Access, open a data access page in Design view.

  2. Select the Workflow Toolbar control, and then open the Tools menu, point to Macro and click Microsoft Script Editor.

  3. If the Document Outline window is not displayed, select the View menu, choose Other Windows, and then choose Document Outline.

  4. In the Document Outline window, expand the Workflow Toolbar node to see the ClickAction event.

    **Note   **By default, the Workflow Toolbar control is named ActiveXCtl0. If you have not changed the name using the (ID) property, this object appears at the top of the Client Objects & Events node.

  5. When you double-click the event, the appropriate syntax is added to the data access page directly above the </HEAD> tag.

Example of a ClickAction script handler for a data access page:

<SCRIPT event=ClickAction for=ActiveXCtl0 language=vbscript>
<!--
   'code goes here
-->
</SCRIPT>

See Also

SQL Server Workflow Toolbar Control | Workflow Toolbar Features | Workflow Toolbar Object Model | Distributing the Toolbar with an Application