Tuesday, November 20, 2007

Understanding Access 2007 Layout Grouping


Here's a look in design mode at one of the new Access 2007 features - Stacked Layout. The highlighted controls are grouped together in a table-like structure in such a way that when you change the width of one control, the other controls in the same column change width as well. Same for controls in rows. This is a nice feature for helping to keep controls organized on a form.

But what if you want to manipulate these controls at runtime? Say change the size and/or position of these control? Like so (from a command button OnClick event procedure):

Text0.Left = Text0.Left + 100

You'll find that these controls are quite a different animal. First, moving one control will move ALL of the controls in the group - well, depending on which of the controls in the layout group you move, that is. In my experimentation, if you attempt to move any control in the right column, nothing happens. But moving the control in the upper left moves all the controls in the group.

But what if you change a font in one of the controls, does it change for all the controls in the layout group? No.

Weird. More on layout groups later.

First Post

Hi. This is intended to be a blog where I post up some musings, code and or examples of what I'm working on or what I've discovered about Microsoft Access. I'm an Access developer who finds himself digging deep under the hood of Access at times, and sometimes I find something interesting to share with the Access developer community. We'll see how this goes. I've tried blogging before and it just seems to be hard to keep up with. Please bear with any large gaps between posts.

Thanks,

Peter De Baets