Solved How to work with stacked or tabbed layout?

MsAccessNL

Member
Local time
Today, 23:43
Joined
Aug 27, 2022
Messages
204
How do you get this empty boxes/spaces in a stacked or tabbed layout.?
 

Attachments

  • EmptyStackControl.PNG
    EmptyStackControl.PNG
    48.3 KB · Views: 136
these are just the system's way of spacing the fields when you use auto form-build, it lays out all fields and labels and columns.
you can just copy an existing one and paste where-ever, or use an empty textbox.
 
If you want to add your own empty cells, you would insert them in.
 
How do you get this empty boxes/spaces in a stacked or tabbed layout.?
The Layout itself consists of rows and columns, just like an html table. In fact, the layout feature was introduced in A2007 to lay the groundwork for support of Access Web Databases, which were "html" forms that ran both in the browser and in the Access environment. They can be quite useful or a real PITA, depending on how you implement them and how complex your actual form is.

The importance of understanding that this is a table of rows and columns lies in the fact that an Access control can either be placed in a cell (i.e. the junction of a row and column) in the layout, or directly on the form itself. If it is in the cell, then it is sized to fit that cell. Expand the cell vertically or horizontally and the control in it also resizes accordingly.

To provide more flexibility, MS allows you to do three things:
  • Insert new rows above or below a particular row
  • Insert new columns to the left or right of a particular column
  • Merge two adjacent cells (vertically or horizontally) or split a cell (vertically or horizontally)
With that capability, the emergence of empty cells is inevitable. When you split a cell with a text box in it, for example, the text box must go into one of the two new cells. But that means the other new cell is now empty.
You can also insert new rows and columns which automatically is populated with empty cells, either vertically or horizontally.

It can take quite a bit of fiddling to get a layout to display the way you want it to display. And, unfortunately, it's also quite easy to blow it all into a chaotic mess.

I often start with a layout to get a basic placement of controls where I want them because the rows and columns automatically line them up both vertically and horizontally. But most of the time I remove the layout before making any final fiddly, minute adjustments to the controls.
 
The Layout itself consists of rows and columns, just like an html table. In fact, the layout feature was introduced in A2007 to lay the groundwork for support of Access Web Databases, which were "html" forms that ran both in the browser and in the Access environment. They can be quite useful or a real PITA, depending on how you implement them and how complex your actual form is.

The importance of understanding that this is a table of rows and columns lies in the fact that an Access control can either be placed in a cell (i.e. the junction of a row and column) in the layout, or directly on the form itself. If it is in the cell, then it is sized to fit that cell. Expand the cell vertically or horizontally and the control in it also resizes accordingly.

To provide more flexibility, MS allows you to do three things:
  • Insert new rows above or below a particular row
  • Insert new columns to the left or right of a particular column
  • Merge two adjacent cells (vertically or horizontally) or split a cell (vertically or horizontally)
With that capability, the emergence of empty cells is inevitable. When you split a cell with a text box in it, for example, the text box must go into one of the two new cells. But that means the other new cell is now empty.
You can also insert new rows and columns which automatically is populated with empty cells, either vertically or horizontally.

It can take quite a bit of fiddling to get a layout to display the way you want it to display. And, unfortunately, it's also quite easy to blow it all into a chaotic mess.

I often start with a layout to get a basic placement of controls where I want them because the rows and columns automatically line them up both vertically and horizontally. But most of the time I remove the layout before making any final fiddly, minute adjustments to the controls.
Thank you for this usefull information! I will try it out in design and remove them later, just as you are proposing. I see the cells have properties, so i assume you can address them with vba to? (If you use the layout option together with a subformcontrol with it's anchor property to both, it autoresizes the subform and moves all your controls on your form to the correct position, that can be quite usefull, I think..)
 
Thank you for this usefull information! I will try it out in design and remove them later, just as you are proposing. I see the cells have properties, so i assume you can address them with vba to? (If you use the layout option together with a subformcontrol with it's anchor property to both, it autoresizes the subform and moves all your controls on your form to the correct position, that can be quite usefull, I think..)
I have never tried to address empty cells with VBA and see no point in doing so, but if you find it possible and useful, please let us know.
 

Users who are viewing this thread

Back
Top Bottom