# FormDateFieldInsert Method

> Inserts a date form field at the input position with a date, an optional date control, an empty width in twips (default 2000) and a date format picture.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > FormDateFieldInsert Method
- **462 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formdatefieldinsert-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formdatefieldinsert-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formdatefieldinsert-method/llms-full.txt

---

This method inserts a date field into the document at the current text input position.

Introduced: 28.0.

### Syntax

```vbscript
TXTextControl.FormDateFieldInsert Date, ShowDateControl [, EmptyWidth [, Format]]
```

### Parameters

| Parameter | Description |
|---|---|
| Date | Specifies a date. The user can change this date through a date control. When this parameter does not contain a date, the new date field is empty. |
| ShowDateControl | Specifies whether the date control is immediately shown after insertion. |
| EmptyWidth | Optional. Specifies the width of the date field, in [twips](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/#measure-in-twips), when there is no date selected. If this parameter is omitted, a default width of 2000 twips is used. |
| Format | Optional. Specifies the format how to display the date. It can be a Day, Month, Year, and Era Format Picture string. When this parameter is omitted a default format is used depending on the language set for the date field's text. |

### Return Value

The method returns True if the date field could be inserted, otherwise it returns False.

### Data Types

| Name | Data type |
|---|---|
| Date | Date |
| ShowDateControl | Boolean |
| EmptyWidth | Integer |
| Format | String |
| Return value | Boolean |

### Remarks

Inserting a form field changes the value of the [FieldCurrent](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fieldcurrent-property/llms-full.txt) property to the identifier of the newly created field.

### See Also

- [FormComboBoxInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formcomboboxinsert-method/llms-full.txt)
- [FormCheckBoxInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formcheckboxinsert-method/llms-full.txt)
- [FormDropDownListInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formdropdownlistinsert-method/llms-full.txt)
- [FormTextFieldInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formtextfieldinsert-method/llms-full.txt)
- [Programming Category: Form Fields](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/form-fields/llms-full.txt)

---

## Nearby

- **Previous:** [FormDateChanged Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formdatechanged-event/llms-full.txt)
- **Next:** [FormDropDownListInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formdropdownlistinsert-method/llms-full.txt)
