CreateIndexedField(FieldName As String, FieldType As Integer, Format As String, FormatType As Integer, MarkMax1 As Boolean, MarkMin1 As Boolean, PageNo As Integer, XPos As Integer, YPos As Integer, Width As Integer, Height As Integer, XSize As Integer, YSize As Integer) As Object

Available in FORMS 5-3 Service Pack 2 and later.

FormDef object

Creates indexed fields in the search area specified by XPos, YPos, Width, and Height. Similar to the "letting FORMS detect double-clickable fields in a series" functionality described in FORMS Help, except that the fields are always indexed from left to right and top to bottom.

The fields must have borders and be “double-clickable.”

If successful, the method returns the first FieldDef object that was found, with index 1. If not, an empty VARIANT is returned.

Syntax

[ReturnValue =] Object.CreateIndexedField(FieldName, FieldType, Format, FormatType, MarkMax1, MarkMin1, PageNo, XPos, YPos, Width, Height, XSize, YSize)

Parameter

Data type

Description

FieldName

String

Specifies the name of the field.

FieldType

Integer

Specifies the type of field. Choose one of these values:

1 = Character field. This is the most common field type.

4 = Image field

5 = Mark field

6 = Object field

7 = Barcode field

8 = Copy field

Format

String

The format string (see SetFormat for more information).

FormatType

Integer

The format type (see SetFormatType for details).

MarkMax1

Boolean

Sets the Max. 1 option. This works like SetMarkMax1. Only used when defining mark fields.

MarkMin1

Boolean

Sets the Min. 1 option. This works like SetMarkMin1. Only used when defining mark fields.

PageNo

Integer

Specifies whether the fields are to be created on the front or back page of the form definition: 1 for the front (even if the form definition is one-sided) or 2 for the back.

XPos, YPos

Integer

Specifies the position of the upper left corner of the search area, in pixels.

Width, Height

Integer

Specifies the width and height of the search area, in pixels.

XSize, YSize

Integer

Specifies the approximate size of the fields to find, in pixels.

This sample code shows how to create a indexed mark fields on the current form definition:

Dim oFieldDef As Object

Set oFieldDef = Application.FormDef.CreateIndexedField("FieldA", 5, "1+", 1, TRUE, FALSE, 1, 455, 555, 120, 940, 20, 20)

 

Defining indexed fields (FORMS Help topic)

CreateField

The FormDef object