SetDBFieldFormatLength

Mon 01 January 2018

Syntax

SetDBFieldFormatLength(FieldName, Length)

Description

Use the SetDBFieldFormatLength function to change the format length for a field. This length controls the maximum number of characters an end user can type into an edit box for this character field. This can be used to limit the user without having to rebuild or alter the table.

Note: This function only works with character fields.

Parameters

Field or Control

Definition

FieldName

Specify the name of the field that you want to modify. This name must be prefixed by the reserved word Field .

Length

Specify the new format length as a number. Valid values are between 1 and 254.

Returns

A constant value. The values are:

Value

Description

%MDA_Success

Function completed successfully.

%MDA_Failure

Function didn't complete successfully.

%MDA_FieldNotFound

The specified field wasn't found in the database.

%MDA_Unsupported

You tried to use this function on a non character field. This function is only supported on character fields.