DataType property (WinStudio scripts)
Applies To
IWSFormComponent interface
Definition
Used to retrieve or set the data type for a specified form component.
Get Syntax
object.DataType
Part | Description |
object | Required. A reference to a form component object. |
Set Syntax
object.DataType = string
Part | Description |
object | Required. A reference to a form component object. |
string | Required. A string containing a valid underlying data type to which the component can be changed. For the availabe data types, see Underlying Type Property. |
Remarks
If the data type for a component is changed programmatically, it does not affect the existing contents in that component. Any new contents or changes, however, must conform to the new data type.
This property is the same as the WinStudio Design Mode, Underlying Type field on the component property sheet. Any changes you make programmatically are reflected in that field.
In the Get Syntax, the return value is a string containing the underlying data type for the specified comonent.
For a list and description of the data types available, see Underlying Type Property.
Example
Sub Main() oComponent = ThisForm.Components("LanguageDescGridCol").DataType Application.ShowMessage("The data type for the Description field is " _ & oComponent & ".") ThisForm.Components("LanguageDescGridCol").DataType = "DATE" oComponent = ThisForm.Components("LanguageDescGridCol").DataType Application.ShowMessage("The data type for the Description field is now " _ & oComponent & ".") End Sub