Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
401 views
in Technique[技术] by (71.8m points)

vba - Programmatically know if a control (or empty cell) is merged in Access Form

I'm working with MS Access VBA, an I have an stacked design in a form (the yellow grid). it's possible to know (programmatically) if a control (or empty cell) is in merged cell or not? Thanks.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

These are not cells, these are controls (labels, textboxes, comboboxes, etc). Controls are not merged. What you see is a grouped layout. Controls are associated as a group and controls will move together if you grab and drag the box in upper left. Resize width of one control and you resize all in same "column"; resize height and you resize all in same "row". Forms and reports built by Access wizards default to grouped layout. To remove grouping: select a group > right click > Layout > Remove layout.

To determine the layout type of a control, reference its Layout property.

Me.controlname.Layout
0 = not grouped
1 = tabular
2 = stacked


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...