Click Script on the Data Source tab in the Text Object Properties dialog box.
A WYSIWYG Text Editor opens.
Enter the script that you want to apply to the object.
Guidelines for the script
The Compilation and Execution of the Object script starts and ends in function Main,
Sub Main functions are mandatory.
All the references to the object inside the script use MyObject.
Text object script properties.
Text object script constants.
Text object script date and time formats.
Text object form level script functions and return types.
Do one of the following to compile the script.
Click thebutton .
Click File>Compile on the WYSIWYG Form Editor menu bar.
The script is compiled. Broadcast reports errors or informs you that the script compiled successfully.
Close the WYSIWYG Form Editor.
A message asks you if you want to save the script to the object.
The script displays as read-only text in the Script box.
Note: You can also click on the Data Source tab to compile the script.
Enter a brief description of your selection in the text box.
(Optional) Revise the font, border and position specifications to accommodate the text requirements.
Note: This can be done during any stage of the form design.
Result: The static text entry displays in the editable form. When the form is broadcast, the dynamic selection will replace this text.
Dim strValue as String
strValue = Form.ItemID
MyObject.TextValue = strValue
Step 5.3. Select a data source for the text object.