Create a split form
A split form gives you two views of your data at the same time — a Form view and a Datasheet view. The two views are connected to the same data source and are synchronized with each other at all times. Selecting a field in one part of the form selects the same field in the other part of the form. You can add, edit, or delete data from either part (provided the record source is updateable and you have not configured the form to prevent these actions).
Working with split forms gives you the benefits of both types of forms in a single form. For example, you can use the datasheet portion of the form to quickly locate a record, and then use the form portion to view or edit the record. The form portion can serve as an attractive and functional header for the datasheet portion. This technique is used in many of the template databases that are available for Access.
Note: Split forms can't be used in Access web databases or Access web apps.
What do you want to do?
Create a new split form by using the Split Form tool
This procedure creates a new split form from scratch. The form is based on a table or query that you select from the Navigation Pane or have open in Datasheet view.
-
In the Navigation Pane, click the table or query that contains the data that you want on your form. Or, open the table or query in Datasheet view.
-
On the Create tab, in the Forms group, click More Forms, and then click Split Form.
Access creates the form and displays it in Layout view. In Layout view, you can make design changes to the form while it is displaying data. For example, you can adjust the size of the text boxes to fit the data, if necessary.
Turn your existing form into a split form
You can turn your existing form into a split form by setting a few form properties.
-
Open your form in Layout view by right-clicking it in the Navigation Pane and then clicking Layout View.
-
If the property sheet is not already displayed, press F4 to display it.
-
Select Form from the drop-down list at the top of the property sheet.
-
On the Format tab of the property sheet, in the Default View drop-down list, select Split Form.
-
Save and close the form, and then double-click the form in the Navigation Pane to open it in Form view.
Fine-tune your split form
After you create your split form, you can make some adjustments in Design view or Layout view to get the results you want. To switch to Design view, right-click the form in the Navigation Pane and then click Design View.
Set the split form properties
The following table lists some of the properties that are related to split forms that you can set on the property sheet to fine-tune your form. If the property sheet is not already displayed, press F4 to display it. Also, ensure that Form is selected in the drop-down list at the top of the property sheet. All of the properties in the table are located on the Format tab of the property sheet. Default values can vary depending on how you create the split form.
Property | Description |
Split Form Size | Allows you to specify an exact height or width (depending on whether the form is split vertically or horizontally) for the form part of the split form. For example, type 1" to set the form to a height or width of 1 inch. Type Auto to set the dimension by other means, such as dragging the splitter bar in Layout view. |
Split Form Orientation | Allows you to define whether the datasheet appears above, below, to the left, or to the right of the form. |
Split Form Splitter Bar | If set to Yes, Access allows you to resize the form and datasheet by moving the splitter bar that separates the two parts. You can drag the splitter bar to provide more room or less room for the datasheet. If this property is set to No, the splitter bar is hidden, and the form and datasheet cannot be resized. |
Split Form Datasheet | If set to Allow Edits (and the form's record source is updateable), Access allows edits to be made on the datasheet. If the property is set to Read Only, Access prevents edits from being made on the datasheet. |
Split Form Printing | Allows you to define which portion of the form is printed when you print the form. If the property is set to Form Only, only the form portion is printed. If the property is set to Datasheet Only, only the datasheet portion is printed. |
Save Splitter Bar Position | If set to Yes, the form opens with the splitter bar in the same position in which you last left it. If this property is set to No, the form and datasheet cannot be resized, and the splitter bar is hidden. |
Fix the form separator in place
To fix the form separator in a certain position so that it cannot be moved by the user, do the following:
-
Switch to Design view by right-clicking the form in the Navigation Pane, and then clicking Design View.
-
If the property sheet is not already displayed, press F4 to display it.
-
Select Form from the drop-down list at the top of the property sheet.
-
On the Format tab of the property sheet, set the Split Form Splitter Bar property to No.
-
Set the Save Splitter Bar Position property to Yes.
-
Switch to Layout view by right-clicking the form in the Navigation Pane, and then clicking Layout view.
-
Drag the splitter bar to the position that you want (or type an exact height in the Split Form Size property box).
-
Switch to Form view to view the results.
The separator is fixed in the position where you set it, and the splitter bar is hidden.
Add a field to a split form
-
Switch to Layout view by right-clicking the form in the Navigation Pane, and then clicking Layout View.
-
If the Field List pane is not displayed, on the Design tab, in the Tools group, click Add Existing Fields.
-
Locate the field that you want to add, and then drag the field to the form.
Note: If you drag the field to the datasheet, the field is also added to the form, but it might not appear where you want it. Therefore, we recommend dragging the field to the form.
Delete a field from a split form
-
Switch to Layout view by right-clicking the form in the Navigation Pane, and then clicking Layout View.
-
In the form portion of the split form, click the field to select it, and then press DELETE.
The field is removed from both the form and the datasheet.
No comments:
Post a Comment