Versions 11B / 12 (Approx 0.6 MB) First Published 9 Feb 2019 Last Updated 8 Mar 2023
Section Links:
Access Split Forms
Issues with Split Forms
The Emulated Split Form
Downloads
Limitations / Future Plans
Feedback
This is a companion to my other articles on split forms: Split Form Issues and Build Your Own Simulated Split Form
1. Access Split Forms
Return To Top
The built-in Access split form provides 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).
Despite its appearance, looking at the design view, shows it is a modified single form
2. Issues with Split Forms
Return To Top
Although split forms often appeal to new Access users, like many experienced developers, I avoid them completely due to their limitations
I abandoned the use of split forms a long time ago as they are difficult to adapt if you want to modify them in any significant way.
For example, limitations with standard split forms include:
a) Display issues
• Form size is uncontrollable in overlapping windows display. When the form is reopened, the height and width are always larger than needed.
Disabling the splitter bar doesn’t help
• Using a split form in a subform fails. Only the single form section is shown.
• Dragging the split form controls to a tab control MAY work OK but see below
• Placing any object such as a label or subform in the unused form footer section is allowed but causes problems.
The form footer items are displayed over the single form controls and partially or wholly cover them. Placing the subform in a tab control doesn’t solve this issue.
• Split forms don’t behave properly with automatic form resizing code unless the splitter bar is disabled
b) Runtime issues
• By design, users can resize/move/hide/unhide/delete datasheet fields at runtime. This can, of course, be useful, particularly in a standalone datasheet form.
However, this can be confusing in a split form where the single form section can only be altered in design view.
• Despite this, the single form can be altered by changes to the datasheet section.
For example, a user right clicks on a datasheet field and, possibly unintentionally, clicks Delete instead of the adjacent menu item, Hide Fields.
The corresponding label in the single section immediately disappears (though not the textbox).
If the changes are saved, the textbox control is also removed from the single form section on reopening as the form’s record source has been changed.
• Changing the datasheet properties to Read Only does NOT prevent this. Doing that stops data changes in the datasheet whilst allowing them in the single form
The right click context menu still allows fields to be deleted.
• Setting the form shortcut menu to No removes the context menu and solves this issue, but also affects the single form section.
c) Code issues
• Missing code context menu
• From memory, there are (or were) several other code issues but with all the above I’m not sure it matters too much how many other code issues remain
Please see my article: Split Form Issues for more details about each of the above issues.
If you like the split form layout but are frustrated by its limitations, an alternative approach is to build your own simulated split form using a single form with a datasheet or continuous subform. This can have almost exactly the same functionality without any of the above drawbacks.
For more details of that approach, see my article, Build Your Own Simulated Split Form
Another alternative is the emulated split form which was developed as a project to try and overcome the difficulties inherent with the built-in split form supplied with Access
3. The Emulated Split Form
Return To Top
This is a single form with no subform. Its appearance is similar to the 'real' split form.
The emulated split form (ESF) has a single form section at the top and a continuous form at the bottom.
Form View
Design View
As with the standard split form, the data can be filtered as well as sorted. The selected record is also highlighted.
Its layout / appearance can also be modified very easily
Attached is a very simple application to demonstrate how it works. All code is provided.
Split Form Mode
Continuous Form Mode
Single Form Mode
The emulated split form can also be successfully used with automatic form resizing, as a subform and in a tab control
NOTE: There were some technical challenges and it took many iterations to work through various bugs before reaching this stage!
Many thanks are due to the following developers for contributing at various stages in the development of this project:
a) Mark Klein (MarkK) - for suggesting the original code used in the Form_Open event
b) Arnel Puzon (arnelgp) - for providing code to highlight the selected row in the continuous form
c) Paul Steel (Gasman) - for testing various iterations in Access 2007 where there were additional issues
d) Static - for fixing a persistent error when moving through the recordset
e) Salvo Fricano (santifrichi) suggested a further enhancement to the original emulated split form.
The idea was to allow users to switch between 3 modes: split form / datasheet only / single form only (see screenshots above)
I included this excellent suggestion in version 11B. The 3 modes are selected using buttons in the form header.
Salvo later did the same thing using a class module in version 12.
The advantage of the class module approach is of course transferability of code.
Both versions are included here so other developers can compare/contrast the code and choose whichever they prefer.
4. Downloads
Return To Top
Click to download:
Current version: Emulated Split Form v11B (zipped)
Class module version: Emulated Split Form v12 (zipped)
Previous version: Emulated Split Form v10S (zipped)
5. Limitations / Future Plans
Return To Top
In the datasheet section of a standard split form, columns can be moved, resized or hidden by the user at runtime
As the emulated split form uses a continuous form rather than a datasheet view, columns can, at present, only be hidden, resized or moved in design view.
A further update is planned which will allow the emulated split form columns to have the same functionality as a datasheet
6. Feedback
Return To Top
Please use the contact form below to let me know whether you found this article interesting/useful or if you have any questions/comments.
Please also consider making a donation towards the costs of maintaining this website. Thank you
Colin Riddington Mendip Data Systems Last Updated 8 Mar 2023
Return to Example Databases Page
|
Return to Top
|