To create the state machine menu items, follow these steps:
- Add a new action menu item to the project named ConWHSVehInspStatusWaiting. Complete the property sheet as follows, in the order stated in the following table:
Property |
Value |
State Machine Data Source |
ConWHSVehicleTable |
State Machine Transition To |
Waiting |
Label |
The label you use in the Waiting state's Label property |
Help Text |
The label you use in the Waiting state's Description property |
Needs Record |
Yes |
- Create the menu items for the remaining states (InProgress and Complete) following the same pattern.
- Open the ConWHSVehicleTable form in the designer.
- Under the form's Design node, expand the ActionPaneHome control, and then ActionPaneActionButtonGroup. Right-click on this control and choose New | Menu Button.
- Rename the new control InspStatusMenuButton. Set the Text and Help Text properties to the same as we used on the state machine, for example, @ConWHS:InspectionStatus and @ConWHS:InspectionStatusHT respectively.
- Then, drag the three menu items onto this menu button. Set the Data Source property to ConWHSVehicleTable--the table that the state machine operates on.
- If you can't add them directly, drag them first onto the ActionPaneActionButtonGroup button group, and then drag them from there to the correct place.
- Save and close all code editors and design windows and build the project.