Opinions on form design

tmyers

Well-known member
Local time
Today, 05:57
Joined
Sep 8, 2020
Messages
1,091
I am curious to see what you all prefer when it comes to form design in regards to forms that have, or could have, multiple subforms. I personally like making smaller subforms their own form as a pop up, but then you lose the ability to do master/child links which can be troublesome. If I have to have that link, I use a tab control and put each subform in its own tab, but lately I have started using a single subform control and used buttons to change the controls source, but that can get "janky" if the forms have wildly different size requirements.

What is all of your preferences?
 
When I was faced with the "multiple subs" scenario, I used multi-page TAB controls. The only trick is, of course, that you are constrained by the size of the main form since your sub-forms cannot exceed the size of the tab control margins, which in turn must fit within the main form. But if you can make that work, it is very efficient.
 
I do like tab controls. I found I started to use them a bit too much though and had them all over the place packing probably too many things into them. That was when I started moving more towards changing the subform controls source. Both methods I found still have the problem of sizing depending on what you are putting in them.
 
I use popups when I want the main form to be visible but I always open them as dialog. The FK is no problem, you can pass it in the OpenArgs and populate it in the form's BeforeInsert event so it works no matter how many records you add.

But, I also use a tab control. The tab control just has to be as big as the biggest subform. Depending on how many subforms I have, I may not load any except the first until the tab is clicked.
 
I did not know you could prevent the subform from loading until the tab itself was clicked. That would make a form much faster if you were dealing with large recordsets in each of the subforms.
 
I personally like making smaller subforms their own form as a pop up, but then you lose the ability to do master/child links which can be troublesome.
Parent/child links shouldn't be an issue. You filter the pop up for to the records matching the ID of the parent/source form to establish the parent/child link. - It's done differently from linking a sub form, but the effect is essentially the same.

As for the general design decision:

A pop up form puts additional cognitive and motorical load on the user.

Pop ups opening on top of the main form will disturb the visual picture of the user by covering an area of the main form. They might need repositioning for viewing information in the pop up and main form side by side. In contrast, multiple sub forms are in a fixed location. Even if the individual sub forms are very different from each other, the overall visual impression remains the same for the user.

Opening and closing a sub form requires two clicks to different locations on the screen, with the target area for the closing click being unknown before the pop is open (see above). Do not underestimate the cognitive load this implies for navigating the application!
In contrast, the click target area for switching to a different sub form is constant and visible immediately once the main form is visible.

Pop up forms are fairly flexible regarding design and size. Sub forms on the other hand must fit into the available space in the parent form and should have a visually uniform design with the main form, which limits the design options.

A major factor in deciding which option to use, should be the context in the application. If the "child" form displays additional information that should/must be seen in direct combination with the information in the main form, a sub form is usually the better choice.
However, if the information/action in the "child" forms is contextually only loosely connected to the main form, a pop up might be a better choice as it also visually emphasizes the context switch.

I'm not say one option is better than the other, but you should be aware of their effects on the UX.

PS: Here is a link to short book review of About Face - The Essentials of Interaction Design, which I highly recommend in regards to UX design.
 
Last edited:
NO form should be bound to a "lot" of records. But, you can set the ControlSource of the subform control in the click event of the tab.
 
For me it depends on requirements but typically I have a single main subform with ancillary subforms that the user can expose when required -,think navigation window, reference tables, etc

also have the ability to ‘lift’ these off the main form - i.e. create an instance as a pop up
 
also have the ability to ‘lift’ these off the main form - i.e. create an instance as a pop up
Ive done that once before with a datasheet subform and really liked the result it provided.
 
Subforms and pop up forms are both useful form formats. But there are places where they should be avoided. Best example I can think of is to never allow a workflow where you can add children before you add the parent. Always add the parent first. Also, subforms in tab controls are handy but you have to keep in mind Access has a limit of open queries.
 
Last edited:
Subforms and pop up forms are both useful form formats. But there are places where they should be avoided. Best example I can think of is to never allow a workflow where you can add children before you add the parent. Always add the parent first. Also, subforms in tab controls are handy but you have to keep in mind Access has a limit of open queries.
I think the most I have ever managed to cram onto a form was 4, maybe 5. I did not know Access had a limit on that but it makes sense that it would. That is good to know!
 
There are limits to everything. I'm not sure there is a specific limit to subform controls but there is a limit to the number of controls. The thing to remember here is that Access never forgets. So, if you add a control and then delete it, that control is still counted in the total number of controls.

Subforms are "heavy" and so having more than a couple will slow down the loading of a form. I have a tab control that has a dozen subforms. However, only the one on the first page is loaded when the form loads. The others don't load until the tab for their page is clicked. Once a form is loaded, it stays loaded though.
 
I think the most I have ever managed to cram onto a form was 4, maybe 5. I did not know Access had a limit on that but it makes sense that it would.
Although in theory there is a limit on open subforms and queries, I doubt anyone in the history of Access has built a realistic form that maxed out these limits. A subform is a control so the limit on subforms is 754 + the other controls over the life time of the form. The number of queries open is probably the number of connections which I believe is 255 (but not sure).
 
I try to not do more than 3 or 4 subforms on any given form and never more then 2 deep (main -> subform -> subform in subfom) as the referencing gets screwy past that but thankfully have never run into a situation where I had to go any deeper and dont know why someone ever really would have to go that deep.

Since Access "remembers" all the controls, is there a way to "clean" them out? Would a compact and repair clear it out?
 
Since Access "remembers" all the controls, is there a way to "clean" them out? Would a compact and repair clear it out
Compact and repair only effects tables has nothing to do with code and forms AFAIK. A debug compile does not remove the history. A copy and paste of controls to a form will but is labor intensive. The easiest is to savetotext and readfromtext
 
I think isladogs had a form tool that basically opened connections until error 3048 was triggered, I think he assumed 255 was the limit so he simply checked 255 - connection count before error = your open connections. It wasn't precise but it gives you a north.

OP, If you worry too much about your database going corrupt and having to rebuild it, you could write some routine that stores the form state somewhere and can re build it in a new database from scratch. I've created such a thing in the past but I stopped needing it when my table and form designs started taking limits into account. Also, as for the subform referencing getting screwy with depth, just inspect your form variable, the reference is there, there's not need to be guessing.
 
I think isladogs had a form tool that basically opened connections until error 3048 was triggered, I think he assumed 255 was the limit so he simply checked 255 - connection count before error = your open connections. It wasn't precise but it gives you a north.

OP, If you worry too much about your database going corrupt and having to rebuild it, you could write some routine that stores the form state somewhere and can re build it in a new database from scratch. I've created such a thing in the past but I stopped needing it when my table and form designs started taking limits into account. Also, as for the subform referencing getting screwy with depth, just inspect your form variable, the reference is there, there's not need to be guessing.
No worries here. Just wanted a discussion on form designs and such and am having fun learning the various details I had no clue about.
 
Thought of another topic in regards to form design. Is there a means to replicate the drop down/tier list like you can see in tables?
1681326184777.png

It would be pretty neat for a few forms I have if I could replicate that kind of functionality.

Edit:
Looks like the control I am looking for is the TreeView. Reading a rather large thread by the master of it, MajP currently.
 
Last edited:
Is there a means to replicate the drop down/tier list like you can see in tables?
Yes. What you are seeing is a functionality of the Datasheet view. You see it with tables because they are by default displayed in Datasheet view. You'll see the same in a form displayed in Datasheet view.

Looks like the control I am looking for is the TreeView. Reading a rather large thread by the master of it, MajP currently.
Well, partially. A TreeView has expandable nodes as you desire, but it hasn't the data grid like display of multiple columns. So, it depends on what is the most important aspect of this feature.
 
Is there a means to replicate the drop down/tier list like you can see in tables?
If you make a form and add a subform then set the main form to datasheet it will create this view.

design.png

formv.png
 

Users who are viewing this thread

Back
Top Bottom